PageRenderTime 45ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/user/permissions.md

http://github.com/gitlabhq/gitlabhq
Markdown | 459 lines | 369 code | 90 blank | 0 comment | 0 complexity | bd403bcd896e638ad955de24c297e863 MD5 | raw file
Possible License(s): CC-BY-SA-4.0, Apache-2.0, CC-BY-3.0, CC0-1.0, JSON
  1. ---
  2. description: 'Understand and explore the user permission levels in GitLab, and what features each of them grants you access to.'
  3. ---
  4. # Permissions
  5. Users have different abilities depending on the access level they have in a
  6. particular group or project. If a user is both in a project's group and the
  7. project itself, the highest permission level is used.
  8. On public and internal projects the Guest role is not enforced. All users will
  9. be able to:
  10. - Create issues.
  11. - Leave comments.
  12. - Clone or download the project code.
  13. When a member leaves a team's project, all the assigned [Issues](project/issues/index.md) and [Merge Requests](project/merge_requests/index.md)
  14. will be unassigned automatically.
  15. GitLab [administrators](../administration/index.md) receive all permissions.
  16. To add or import a user, you can follow the
  17. [project members documentation](project/members/index.md).
  18. For information on eligible approvers for Merge Requests, see
  19. [Eligible approvers](project/merge_requests/merge_request_approvals.md#eligible-approvers).
  20. ## Principles behind permissions
  21. See our [product handbook on permissions](https://about.gitlab.com/handbook/product/#permissions-in-gitlab)
  22. ## Instance-wide user permissions
  23. By default, users can create top-level groups and change their
  24. usernames. A GitLab administrator can configure the GitLab instance to
  25. [modify this behavior](../administration/user_settings.md).
  26. ## Project members permissions
  27. NOTE: **Note:**
  28. In GitLab 11.0, the Master role was renamed to Maintainer.
  29. While Maintainer is the highest project-level role, some actions can only be performed by a personal namespace or group owner,
  30. or an instance admin, who receives all permissions. For more information, see [projects members documentation](project/members/index.md).
  31. The following table depicts the various user permission levels in a project.
  32. | Action | Guest | Reporter | Developer |Maintainer| Owner* |
  33. |---------------------------------------------------|---------|------------|-------------|----------|--------|
  34. | Download project | (*1*) | | | | |
  35. | Leave comments | (*1*) | | | | |
  36. | View approved/blacklisted licenses **(ULTIMATE)** | (*1*) | | | | |
  37. | View License Compliance reports **(ULTIMATE)** | (*1*) | | | | |
  38. | View Security reports **(ULTIMATE)** | (*3*) | | | | |
  39. | View Dependency list **(ULTIMATE)** | (*1*) | | | | |
  40. | View License list **(ULTIMATE)** | (*1*) | | | | |
  41. | View licenses in Dependency list **(ULTIMATE)** | (*1*) | | | | |
  42. | View [Design Management](project/issues/design_management.md) pages | | | | | |
  43. | View project code | (*1*) | | | | |
  44. | Pull project code | (*1*) | | | | |
  45. | View GitLab Pages protected by [access control](project/pages/introduction.md#gitlab-pages-access-control-core) | | | | | |
  46. | View wiki pages | | | | | |
  47. | See a list of jobs | (*3*) | | | | |
  48. | See a job log | (*3*) | | | | |
  49. | Download and browse job artifacts | (*3*) | | | | |
  50. | Create new issue | (*1*) | | | | |
  51. | See related issues | | | | | |
  52. | Create confidential issue | (*1*) | | | | |
  53. | View confidential issues | (*2*) | | | | |
  54. | View [Releases](project/releases/index.md) | (*6*) | | | | |
  55. | View requirements **(ULTIMATE)** | | | | | |
  56. | Assign issues | | | | | |
  57. | Label issues | | | | | |
  58. | Set issue weight | | | | | |
  59. | Lock issue threads | | | | | |
  60. | Manage issue tracker | | | | | |
  61. | Manage related issues **(STARTER)** | | | | | |
  62. | Manage labels | | | | | |
  63. | Create code snippets | | | | | |
  64. | See a commit status | | | | | |
  65. | See a container registry | | | | | |
  66. | See environments | | | | | |
  67. | See a list of merge requests | | | | | |
  68. | View project statistics | | | | | |
  69. | View Error Tracking list | | | | | |
  70. | Create new merge request | | | | | |
  71. | View metrics dashboard annotations | | | | | |
  72. | Create/edit requirements **(ULTIMATE)** | | | | | |
  73. | Pull [packages](packages/index.md) | | | | | |
  74. | Publish [packages](packages/index.md) | | | | | |
  75. | Pull from [Conan repository](packages/conan_repository/index.md), [Maven repository](packages/maven_repository/index.md), or [NPM registry](packages/npm_registry/index.md) **(PREMIUM)** | | | | | |
  76. | Publish to [Conan repository](packages/conan_repository/index.md), [Maven repository](packages/maven_repository/index.md), or [NPM registry](packages/npm_registry/index.md) **(PREMIUM)** | | | | | |
  77. | Upload [Design Management](project/issues/design_management.md) files | | | | | |
  78. | Create/edit/delete [Releases](project/releases/index.md)| | | | | |
  79. | Create new branches | | | | | |
  80. | Push to non-protected branches | | | | | |
  81. | Force push to non-protected branches | | | | | |
  82. | Remove non-protected branches | | | | | |
  83. | Assign merge requests | | | | | |
  84. | Label merge requests | | | | | |
  85. | Lock merge request threads | | | | | |
  86. | Manage/Accept merge requests | | | | | |
  87. | Create new environments | | | | | |
  88. | Stop environments | | | | | |
  89. | Enable Review Apps | | | | | |
  90. | Add tags | | | | | |
  91. | Cancel and retry jobs | | | | | |
  92. | Create or update commit status | | | (*5*) | | |
  93. | Update a container registry | | | | | |
  94. | Remove a container registry image | | | | | |
  95. | Create/edit/delete project milestones | | | | | |
  96. | Use security dashboard **(ULTIMATE)** | | | | | |
  97. | View vulnerability findings in Dependency list **(ULTIMATE)** | | | | | |
  98. | Create issue from vulnerability finding **(ULTIMATE)** | | | | | |
  99. | Dismiss vulnerability finding **(ULTIMATE)** | | | | | |
  100. | View vulnerability **(ULTIMATE)** | | | | | |
  101. | Create vulnerability from vulnerability finding **(ULTIMATE)** | | | | | |
  102. | Resolve vulnerability **(ULTIMATE)** | | | | | |
  103. | Dismiss vulnerability **(ULTIMATE)** | | | | | |
  104. | Apply code change suggestions | | | | | |
  105. | Create and edit wiki pages | | | | | |
  106. | Rewrite/remove Git tags | | | | | |
  107. | Manage Feature Flags **(PREMIUM)** | | | | | |
  108. | Create/edit/delete metrics dashboard annotations | | | | | |
  109. | Use environment terminals | | | | | |
  110. | Run Web IDE's Interactive Web Terminals **(ULTIMATE ONLY)** | | | | ✓ | ✓ |
  111. | Add new team members | | | | | |
  112. | Enable/disable branch protection | | | | | |
  113. | Push to protected branches | | | | | |
  114. | Turn on/off protected branch push for devs | | | | | |
  115. | Enable/disable tag protections | | | | | |
  116. | Edit project | | | | | |
  117. | Edit project badges | | | | | |
  118. | Add deploy keys to project | | | | | |
  119. | Configure project hooks | | | | | |
  120. | Manage Runners | | | | | |
  121. | Manage job triggers | | | | | |
  122. | Manage CI/CD variables | | | | | |
  123. | Manage GitLab Pages | | | | | |
  124. | Manage GitLab Pages domains and certificates | | | | | |
  125. | Remove GitLab Pages | | | | | |
  126. | Manage clusters | | | | | |
  127. | View Pods logs **(ULTIMATE)** | | | | | |
  128. | Manage license policy **(ULTIMATE)** | | | | | |
  129. | Edit comments (posted by any user) | | | | | |
  130. | Manage Error Tracking | | | | | |
  131. | Delete wiki pages | | | | | |
  132. | View project Audit Events | | | | | |
  133. | Manage [push rules](../push_rules/push_rules.md) | | | | | |
  134. | Manage [project access tokens](./project/settings/project_access_tokens.md) **(CORE ONLY)** | | | | | |
  135. | Switch visibility level | | | | | |
  136. | Transfer project to another namespace | | | | | |
  137. | Remove fork relationship | | | | | |
  138. | Remove project | | | | | |
  139. | Delete issues | | | | | |
  140. | Disable notification emails | | | | | |
  141. | Force push to protected branches (*4*) | | | | | |
  142. | Remove protected branches (*4*) | | | | | |
  143. | View CI\CD analytics | | | | | |
  144. | View Code Review analytics **(STARTER)** | | | | | |
  145. | View Insights **(ULTIMATE)** | | | | | |
  146. | View Issues analytics **(PREMIUM)** | | | | | |
  147. | View Repository analytics | | | | | |
  148. | View Value Stream analytics | | | | | |
  149. \* Owner permission is only available at the group or personal namespace level (and for instance admins) and is inherited by its projects.
  150. 1. Guest users are able to perform this action on public and internal projects, but not private projects.
  151. 1. Guest users can only view the confidential issues they created themselves.
  152. 1. If **Public pipelines** is enabled in **Project Settings > CI/CD**.
  153. 1. Not allowed for Guest, Reporter, Developer, Maintainer, or Owner. See [Protected Branches](./project/protected_branches.md).
  154. 1. If the [branch is protected](./project/protected_branches.md#using-the-allowed-to-merge-and-allowed-to-push-settings), this depends on the access Developers and Maintainers are given.
  155. 1. Guest users can access GitLab [**Releases**](project/releases/index.md) for downloading assets but are not allowed to download the source code nor see repository information like tags and commits.
  156. ## Project features permissions
  157. ### Wiki and issues
  158. Project features like wiki and issues can be hidden from users depending on
  159. which visibility level you select on project settings.
  160. - Disabled: disabled for everyone
  161. - Only team members: only team members will see even if your project is public or internal
  162. - Everyone with access: everyone can see depending on your project visibility level
  163. - Everyone: enabled for everyone (only available for GitLab Pages)
  164. ### Protected branches
  165. Additional restrictions can be applied on a per-branch basis with [protected branches](project/protected_branches.md).
  166. Additionally, you can customize permissions to allow or prevent project
  167. Maintainers and Developers from pushing to a protected branch. Read through the documentation on
  168. [Allowed to Merge and Allowed to Push settings](project/protected_branches.md#using-the-allowed-to-merge-and-allowed-to-push-settings)
  169. to learn more.
  170. ### Value Stream Analytics permissions
  171. Find the current permissions on the Value Stream Analytics dashboard, as described in
  172. [related documentation](analytics/value_stream_analytics.md#permissions).
  173. ### Issue Board permissions
  174. Developers and users with higher permission level can use all
  175. the functionality of the Issue Board, that is create/delete lists
  176. and drag issues around. Read through the
  177. [documentation on Issue Boards permissions](project/issue_board.md#permissions)
  178. to learn more.
  179. ### File Locking permissions **(PREMIUM)**
  180. The user that locks a file or directory is the only one that can edit and push their changes back to the repository where the locked objects are located.
  181. Read through the documentation on [permissions for File Locking](project/file_lock.md#permissions-on-file-locking) to learn more.
  182. ### Confidential Issues permissions
  183. Confidential issues can be accessed by reporters and higher permission levels,
  184. as well as by guest users that create a confidential issue. To learn more,
  185. read through the documentation on [permissions and access to confidential issues](project/issues/confidential_issues.md#permissions-and-access-to-confidential-issues).
  186. ## Group members permissions
  187. NOTE: **Note:**
  188. In GitLab 11.0, the Master role was renamed to Maintainer.
  189. Any user can remove themselves from a group, unless they are the last Owner of
  190. the group. The following table depicts the various user permission levels in a
  191. group.
  192. | Action | Guest | Reporter | Developer | Maintainer | Owner |
  193. |--------------------------------------------------------|-------|----------|-----------|------------|-------|
  194. | Browse group | | | | | |
  195. | View Insights charts **(ULTIMATE)** | | | | | |
  196. | View group epic **(ULTIMATE)** | | | | | |
  197. | Create/edit group epic **(ULTIMATE)** | | | | | |
  198. | Manage group labels | | | | | |
  199. | See a container registry | | | | | |
  200. | View metrics dashboard annotations | | | | | |
  201. | Create project in group | | | (3) | (3) | (3) |
  202. | Create/edit/delete group milestones | | | | | |
  203. | Enable/disable a dependency proxy **(PREMIUM)** | | | | | |
  204. | Use security dashboard **(ULTIMATE)** | | | | | |
  205. | Create/edit/delete metrics dashboard annotations | | | | | |
  206. | View/manage group-level Kubernetes cluster | | | | | |
  207. | Create subgroup | | | | (1) | |
  208. | Edit epic comments (posted by any user) **(ULTIMATE)** | | | | (2) | (2) |
  209. | Edit group | | | | | |
  210. | Manage group level CI/CD variables | | | | | |
  211. | Manage group members | | | | | |
  212. | Remove group | | | | | |
  213. | Delete group epic **(ULTIMATE)** | | | | | |
  214. | View group Audit Events | | | | | |
  215. | Disable notification emails | | | | | |
  216. | View Contribution analytics | | | | | |
  217. | View Insights **(ULTIMATE)** | | | | | |
  218. | View Issues analytics **(PREMIUM)** | | | | | |
  219. | View Productivity analytics **(PREMIUM)** | | | | | |
  220. | View Value Stream analytics | | | | | |
  221. 1. Groups can be set to [allow either Owners or Owners and
  222. Maintainers to create subgroups](group/subgroups/index.md#creating-a-subgroup)
  223. 1. Introduced in GitLab 12.2.
  224. 1. Default project creation role can be changed at:
  225. - The [instance level](admin_area/settings/visibility_and_access_controls.md#default-project-creation-protection).
  226. - The [group level](group/index.md#default-project-creation-level).
  227. ### Subgroup permissions
  228. When you add a member to a subgroup, they inherit the membership and
  229. permission level from the parent group. This model allows access to
  230. nested groups if you have membership in one of its parents.
  231. To learn more, read through the documentation on
  232. [subgroups memberships](group/subgroups/index.md#membership).
  233. ## External users **(CORE ONLY)**
  234. In cases where it is desired that a user has access only to some internal or
  235. private projects, there is the option of creating **External Users**. This
  236. feature may be useful when for example a contractor is working on a given
  237. project and should only have access to that project.
  238. External users:
  239. - Cannot create groups, projects, or personal snippets.
  240. - Can only access projects to which they are explicitly granted access,
  241. thus hiding all other internal or private ones from them (like being
  242. logged out).
  243. Access can be granted by adding the user as member to the project or group.
  244. Like usual users, they will receive a role in the project or group with all
  245. the abilities that are mentioned in the [permissions table above](#project-members-permissions).
  246. For example, if an external user is added as Guest, and your project is
  247. private, they will not have access to the code; you would need to grant the external
  248. user access at the Reporter level or above if you want them to have access to the code. You should
  249. always take into account the
  250. [project's visibility and permissions settings](project/settings/index.md#sharing-and-permissions)
  251. as well as the permission level of the user.
  252. NOTE: **Note:**
  253. External users still count towards a license seat.
  254. An administrator can flag a user as external by either of the following methods:
  255. - Either [through the API](../api/users.md#user-modification).
  256. - Or by navigating to the **Admin Area > Overview > Users** to create a new user
  257. or edit an existing one. There, you will find the option to flag the user as
  258. external.
  259. ### Setting new users to external
  260. By default, new users are not set as external users. This behavior can be changed
  261. by an administrator on the **Admin Area > Settings > General** page, under **Account and limit**.
  262. If you change the default behavior of creating new users as external, you will
  263. have the option to narrow it down by defining a set of internal users.
  264. The **Internal users** field allows specifying an email address regex pattern to
  265. identify default internal users. New users whose email address matches the regex
  266. pattern will be set to internal by default rather than an external collaborator.
  267. The regex pattern format is Ruby, but it needs to be convertible to JavaScript,
  268. and the ignore case flag will be set (`/regex pattern/i`). Here are some examples:
  269. - Use `\.internal@domain\.com$` to mark email addresses ending with
  270. `.internal@domain.com` as internal.
  271. - Use `^(?:(?!\.ext@domain\.com).)*$\r?` to mark users with email addresses
  272. NOT including `.ext@domain.com` as internal.
  273. CAUTION: **Warning:**
  274. Be aware that this regex could lead to a
  275. [regular expression denial of service (ReDoS) attack](https://en.wikipedia.org/wiki/ReDoS).
  276. ## Free Guest users **(ULTIMATE)**
  277. When a user is given Guest permissions on a project, group, or both, and holds no
  278. higher permission level on any other project or group on the GitLab instance,
  279. the user is considered a guest user by GitLab and will not consume a license seat.
  280. There is no other specific "guest" designation for newly created users.
  281. If the user is assigned a higher role on any projects or groups, the user will
  282. take a license seat. If a user creates a project, the user becomes a Maintainer
  283. on the project, resulting in the use of a license seat. Also, note that if your
  284. project is internal or private, Guest users will have all the abilities that are
  285. mentioned in the [permissions table above](#project-members-permissions) (they
  286. will not be able to browse the project's repository for example).
  287. TIP: **Tip:**
  288. To prevent a guest user from creating projects, as an admin, you can edit the
  289. user's profile to mark the user as [external](#external-users-core-only).
  290. Beware though that even if a user is external, if they already have Reporter or
  291. higher permissions in any project or group, they will **not** be counted as a
  292. free guest user.
  293. ## Auditor users **(PREMIUM ONLY)**
  294. >[Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/998) in [GitLab Premium](https://about.gitlab.com/pricing/) 8.17.
  295. Auditor users are given read-only access to all projects, groups, and other
  296. resources on the GitLab instance.
  297. An Auditor user should be able to access all projects and groups of a GitLab instance
  298. with the permissions described on the documentation on [auditor users permissions](../administration/auditor_users.md#permissions-and-restrictions-of-an-auditor-user).
  299. [Read more about Auditor users.](../administration/auditor_users.md)
  300. ## Project features
  301. Project features like wiki and issues can be hidden from users depending on
  302. which visibility level you select on project settings.
  303. - Disabled: disabled for everyone
  304. - Only team members: only team members will see even if your project is public or internal
  305. - Everyone with access: everyone can see depending on your project visibility level
  306. - Everyone: enabled for everyone (only available for GitLab Pages)
  307. ## GitLab CI/CD permissions
  308. NOTE: **Note:**
  309. In GitLab 11.0, the Master role was renamed to Maintainer.
  310. GitLab CI/CD permissions rely on the role the user has in GitLab. There are four
  311. permission levels in total:
  312. - admin
  313. - maintainer
  314. - developer
  315. - guest/reporter
  316. The admin user can perform any action on GitLab CI/CD in scope of the GitLab
  317. instance and project. In addition, all admins can use the admin interface under
  318. `/admin/runners`.
  319. | Action | Guest, Reporter | Developer |Maintainer| Admin |
  320. |---------------------------------------|-----------------|-------------|----------|--------|
  321. | See commits and jobs | | | | |
  322. | Retry or cancel job | | | | |
  323. | Erase job artifacts and trace | | (*1*) | | |
  324. | Remove project | | | | |
  325. | Create project | | | | |
  326. | Change project configuration | | | | |
  327. | Add specific runners | | | | |
  328. | Add shared runners | | | | |
  329. | See events in the system | | | | |
  330. | Admin interface | | | | |
  331. 1. Only if the job was triggered by the user
  332. ### Job permissions
  333. NOTE: **Note:**
  334. In GitLab 11.0, the Master role was renamed to Maintainer.
  335. >**Note:**
  336. GitLab 8.12 has a completely redesigned job permissions system.
  337. Read all about the [new model and its implications](project/new_ci_build_permissions_model.md).
  338. This table shows granted privileges for jobs triggered by specific types of
  339. users:
  340. | Action | Guest, Reporter | Developer |Maintainer| Admin |
  341. |---------------------------------------------|-----------------|-------------|----------|---------|
  342. | Run CI job | | | | |
  343. | Clone source and LFS from current project | | | | |
  344. | Clone source and LFS from public projects | | | | |
  345. | Clone source and LFS from internal projects | | (*1*) | (*1*) | |
  346. | Clone source and LFS from private projects | | (*2*) | (*2*) | (*2*) |
  347. | Pull container images from current project | | | | |
  348. | Pull container images from public projects | | | | |
  349. | Pull container images from internal projects| | (*1*) | (*1*) | |
  350. | Pull container images from private projects | | (*2*) | (*2*) | (*2*) |
  351. | Push container images to current project | | | | |
  352. | Push container images to other projects | | | | |
  353. | Push source and LFS | | | | |
  354. 1. Only if the user is not an external one
  355. 1. Only if the user is a member of the project
  356. ### New CI job permissions model
  357. GitLab 8.12 has a completely redesigned job permissions system. To learn more,
  358. read through the documentation on the [new CI/CD permissions model](project/new_ci_build_permissions_model.md#new-ci-job-permissions-model).
  359. ## Running pipelines on protected branches
  360. The permission to merge or push to protected branches is used to define if a user can
  361. run CI/CD pipelines and execute actions on jobs that are related to those branches.
  362. See [Security on protected branches](../ci/pipelines/index.md#pipeline-security-on-protected-branches)
  363. for details about the pipelines security model.
  364. ## LDAP users permissions
  365. Since GitLab 8.15, LDAP user permissions can now be manually overridden by an admin user.
  366. Read through the documentation on [LDAP users permissions](../administration/auth/how_to_configure_ldap_gitlab_ee/index.md) to learn more.
  367. ## Project aliases
  368. Project aliases can only be read, created and deleted by a GitLab administrator.
  369. Read through the documentation on [Project aliases](../user/project/index.md#project-aliases-premium-only) to learn more.