From 21d969e772eef68abd3be91f5bbd616e18f35d54 Mon Sep 17 00:00:00 2001 From: Amy Qualls <aqualls@gitlab.com> Date: Mon, 22 May 2023 18:28:30 +0000 Subject: [PATCH] Revise protected-branch entitlement for clarity Reverse the order to make a little clearer what version is available to everyone, and what version is available to higher tiers. Also, clarify that two particular fields have more selection available to higher tiers. --- doc/user/project/protected_branches.md | 47 ++++++++++++++------------ doc/user/project/protected_tags.md | 6 +++- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md index c7c41ee8558a0..8c2bcb250a932 100644 --- a/doc/user/project/protected_branches.md +++ b/doc/user/project/protected_branches.md @@ -81,6 +81,31 @@ Administrators can set a default branch protection level in the Configure protected branches for all projects in a group, or just for a project. +### For a project + +Prerequisites: + +- You must have at least the Maintainer role. +- When granting a group **Allowed to merge** or **Allowed to push and merge** permissions + on a protected branch, the group must be added to the project. + +To protect a branch: + +1. On the top bar, select **Main menu > Projects** and find your project. +1. On the left sidebar, select **Settings > Repository**. +1. Expand **Protected branches**. +1. From the **Branch** dropdown list, select the branch you want to protect. +1. From the **Allowed to merge** list, select a role that can merge into this branch. +1. From the **Allowed to push and merge** list, select a role that can push to this branch. + + NOTE: + In GitLab Premium and Ultimate, you can also add groups or individual users + to **Allowed to merge** and **Allowed to push and merge**. + +1. Select **Protect**. + +The protected branch displays in the list of protected branches. + ### For all projects in a group **(PREMIUM)** > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106532) in GitLab 15.9 behind a feature flag, disabled by default. @@ -108,28 +133,6 @@ To protect a branch for all the projects in a group: The protected branch is added to the list of protected branches. -### For a project - -Prerequisite: - -- You must have at least the Maintainer role. -- When granting a group **Allowed to merge** or **Allowed to push and merge** permissions - on a protected branch, the group must be added to the project. - -To protect a branch: - -1. On the top bar, select **Main menu > Projects** and find your project. -1. On the left sidebar, select **Settings > Repository**. -1. Expand **Protected branches**. -1. From the **Branch** dropdown list, select the branch you want to protect. -1. From the **Allowed to merge** list, select a role that can merge into this branch. - In GitLab Premium and Ultimate, you can also add groups or individual users. -1. From the **Allowed to push and merge** list, select a role that can push to this branch. - In GitLab Premium and Ultimate, you can also add groups or individual users. -1. Select **Protect**. - -The protected branch displays in the list of protected branches. - ## Configure multiple protected branches by using a wildcard If both a specific rule and a wildcard rule apply to the same branch, the most diff --git a/doc/user/project/protected_tags.md b/doc/user/project/protected_tags.md index ac9f990a5984d..c8a02366e1951 100644 --- a/doc/user/project/protected_tags.md +++ b/doc/user/project/protected_tags.md @@ -40,7 +40,11 @@ Prerequisites: 1. Enter the string to use for tag matching. Wildcards (`*`) are supported. 1. Select **Create wildcard**. 1. In **Allowed to create** , select roles that may create protected tags. - In GitLab Premium and Ultimate, you can also select groups or individual users. + + NOTE: + In GitLab Premium and Ultimate, you can also add groups or individual users + to **Allowed to create**. + 1. Select **Protect**. The protected tag (or wildcard) displays in the **Protected tags** list. -- GitLab