2022-01-05 03:37:00 +00:00
---
date: "2021-12-13:10:10+08:00"
title: "Permissions"
slug: "permissions"
2023-07-26 04:53:13 +00:00
sidebar_position: 14
2022-01-05 03:37:00 +00:00
toc: false
draft: false
Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.
1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.
---------
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-04-28 03:33:41 +00:00
aliases:
- /en-us/permissions
2022-01-05 03:37:00 +00:00
menu:
sidebar:
parent: "usage"
name: "Permissions"
2023-07-26 04:53:13 +00:00
sidebar_position: 14
2022-01-05 03:37:00 +00:00
identifier: "permissions"
---
# Permissions
Gitea supports permissions for repository so that you can give different access for different people. At first, we need to know about `Unit` .
## Unit
2023-06-05 07:43:17 +00:00
In Gitea, we call a sub module of a repository `Unit` . Now we have following possible units.
2022-01-05 03:37:00 +00:00
| Name | Description | Permissions |
| --------------- | ---------------------------------------------------- | ----------- |
| Code | Access source code, files, commits and branches. | Read Write |
| Issues | Organize bug reports, tasks and milestones. | Read Write |
| PullRequests | Enable pull requests and code reviews. | Read Write |
| Releases | Track project versions and downloads. | Read Write |
| Wiki | Write and share documentation with collaborators. | Read Write |
| ExternalWiki | Link to an external wiki | Read |
| ExternalTracker | Link to an external issue tracker | Read |
| Projects | The URL to the template repository | Read Write |
2023-06-05 07:43:17 +00:00
| Packages | Packages which linked to this repository | Read Write |
| Actions | Review actions logs or restart/cacnel pipelines | Read Write |
2022-01-05 03:37:00 +00:00
| Settings | Manage the repository | Admin |
With different permissions, people could do different things with these units.
| Name | Read | Write | Admin |
| --------------- | ------------------------------------------------- | ---------------------------- | ------------------------- |
| Code | View code trees, files, commits, branches and etc. | Push codes. | - |
| Issues | View issues and create new issues. | Add labels, assign, close | - |
| PullRequests | View pull requests and create new pull requests. | Add labels, assign, close | - |
| Releases | View releases and download files. | Create/Edit releases | - |
| Wiki | View wiki pages. Clone the wiki repository. | Create/Edit wiki pages, push | - |
| ExternalWiki | Link to an external wiki | - | - |
| ExternalTracker | Link to an external issue tracker | - | - |
| Projects | View the boards | Change issues across boards | - |
2023-06-05 07:43:17 +00:00
| Packages | View the packages | Upload/Delete packages | - |
| Actions | View the Actions logs | Approve / Cancel / Restart | - |
2022-01-05 03:37:00 +00:00
| Settings | - | - | Manage the repository |
And there are some differences for permissions between individual repositories and organization repositories.
## Individual Repository
2022-07-28 01:22:47 +00:00
For individual repositories, the creators are the only owners of repositories and have no limit to change anything of this
2022-01-05 03:37:00 +00:00
repository or delete it. Repositories owners could add collaborators to help maintain the repositories. Collaborators could have `Read` , `Write` and `Admin` permissions.
2023-06-05 07:43:17 +00:00
F or a private repository, the experience is similar to visiting an anonymous public repository. You have access to all the available content within the repository, including the ability to clone the code, create issues, respond to issue comments, submit pull requests, and more. If you have 'Write' permission, you can push code to specific branches of the repository, provided it's permitted by the branch protection rules. Additionally, you can make changes to the wiki pages. With 'Admin' permission, you have the ability to modify the repository's settings.
But you cannot delete or transfer this repository if you are not that repository's owner.
2022-01-05 03:37:00 +00:00
## Organization Repository
2023-06-05 07:43:17 +00:00
For individual repositories, the owner is the user who created it. For organization repositories, the owners are the members of the owner team on this organization. All the permissions depends on the team permission settings.
### Owner Team
The owner team will be created when the organization is created, and the creator will become the first member of the owner team. The owner team cannot be deleted and there is at least one member.
### Admin Team
When creating teams, there are two types of teams. One is the admin team, another is the general team. An admin team can be created to manage some of the repositories, whose members can do anything with these repositories. Only members of the owner or admin team can create a new team.
### General Team
2022-01-05 03:37:00 +00:00
2023-06-05 07:43:17 +00:00
A general team in an organization has unit permissions settings. It can have members and repositories scope.
2022-01-05 03:37:00 +00:00
2023-06-05 07:43:17 +00:00
- A team could access all the repositories in this organization or special repositories.
- A team could also be allowed to create new repositories or not.
2022-01-05 03:37:00 +00:00
2023-06-05 07:43:17 +00:00
The General team can be created to do the operations allowed by their permissions. One member could join multiple teams.