|
| 1 | +--- |
| 2 | +date: "2021-12-13:10:10+08:00" |
| 3 | +title: "Permissions" |
| 4 | +slug: "permissions" |
| 5 | +weight: 14 |
| 6 | +toc: false |
| 7 | +draft: false |
| 8 | +menu: |
| 9 | + sidebar: |
| 10 | + parent: "usage" |
| 11 | + name: "Permissions" |
| 12 | + weight: 14 |
| 13 | + identifier: "permissions" |
| 14 | +--- |
| 15 | + |
| 16 | +# Permissions |
| 17 | + |
| 18 | +**Table of Contents** |
| 19 | + |
| 20 | +{{< toc >}} |
| 21 | + |
| 22 | +Gitea supports permissions for repository so that you can give different access for different people. At first, we need to know about `Unit`. |
| 23 | + |
| 24 | +## Unit |
| 25 | + |
| 26 | +In Gitea, we call a sub module of a repository `Unit`. Now we have following units. |
| 27 | + |
| 28 | +| Name | Description | Permissions | |
| 29 | +| --------------- | ---------------------------------------------------- | ----------- | |
| 30 | +| Code | Access source code, files, commits and branches. | Read Write | |
| 31 | +| Issues | Organize bug reports, tasks and milestones. | Read Write | |
| 32 | +| PullRequests | Enable pull requests and code reviews. | Read Write | |
| 33 | +| Releases | Track project versions and downloads. | Read Write | |
| 34 | +| Wiki | Write and share documentation with collaborators. | Read Write | |
| 35 | +| ExternalWiki | Link to an external wiki | Read | |
| 36 | +| ExternalTracker | Link to an external issue tracker | Read | |
| 37 | +| Projects | The URL to the template repository | Read Write | |
| 38 | +| Settings | Manage the repository | Admin | |
| 39 | + |
| 40 | +With different permissions, people could do different things with these units. |
| 41 | + |
| 42 | +| Name | Read | Write | Admin | |
| 43 | +| --------------- | ------------------------------------------------- | ---------------------------- | ------------------------- | |
| 44 | +| Code | View code trees, files, commits, branches and etc. | Push codes. | - | |
| 45 | +| Issues | View issues and create new issues. | Add labels, assign, close | - | |
| 46 | +| PullRequests | View pull requests and create new pull requests. | Add labels, assign, close | - | |
| 47 | +| Releases | View releases and download files. | Create/Edit releases | - | |
| 48 | +| Wiki | View wiki pages. Clone the wiki repository. | Create/Edit wiki pages, push | - | |
| 49 | +| ExternalWiki | Link to an external wiki | - | - | |
| 50 | +| ExternalTracker | Link to an external issue tracker | - | - | |
| 51 | +| Projects | View the boards | Change issues across boards | - | |
| 52 | +| Settings | - | - | Manage the repository | |
| 53 | + |
| 54 | +And there are some differences for permissions between individual repositories and organization repositories. |
| 55 | + |
| 56 | +## Individual Repository |
| 57 | + |
| 58 | +For individual repositories, the creators are the only owners of repositories and have no limit to change anything of this |
| 59 | +repository or delete it. Repositories owners could add collaborators to help maintain the repositories. Collaborators could have `Read`, `Write` and `Admin` permissions. |
| 60 | + |
| 61 | +## Organization Repository |
| 62 | + |
| 63 | +Different from individual repositories, the owner of organization repositories are the owner team of this organization. |
| 64 | + |
| 65 | +### Team |
| 66 | + |
| 67 | +A team in an organization has unit permissions settings. It can have members and repositories scope. A team could access all the repositories in this organization or special repositories changed by the owner team. A team could also be allowed to create new |
| 68 | +repositories. |
| 69 | + |
| 70 | +The owner team will be created when the organization created and the creator will become the first member of the owner team. |
| 71 | +Notice Gitea will not allow a people is a member of organization but not in any team. The owner team could not be deleted and only |
| 72 | +members of owner team could create a new team. Admin team could be created to manage some of repositories, members of admin team |
| 73 | +could do anything with these repositories. Generate team could be created by the owner team to do the permissions allowed operations. |
0 commit comments