Add group-level indicator to branch protection
What does this MR do and why?
Add group-level indicator to branch protection
New branch rule view was showing group level protections without a clear indication and with option to edit. Marking protected branches with their level helps show the rules is inherited and need editing on group level.
- all four sections of protected branches now have a lock icon with popover explaining inheritance
- clear message for users that can or cannot group level protection, on what to do to edit them
- delete button is not rendered for inherited rules
References
- designs
- decision about the lock icon placement with a toggle
- decision on no possessive
'sin UI text
Screenshots or screen recordings
| Context | Before | After |
|---|---|---|
| cannot edit group level protection | ![]() |
![]() |
| can edit group level protection | ![]() |
![]() |
| project level protection, no changes expected | ![]() |
![]() |
Screen reader
How to set up and validate locally
- Go to the group. Navigate to Settings / Repository / Protected branches. Example:
http://gdk.test:8080/groups/flightjs/-/settings/repository#js-protected-branches-settings - Set a group level protected branch. For example, for
*-group-levelwildcard. - Go to a project within that group. Navigate to Settings / Repository / Branch rules / [YOUR_GROUP_LEVEL_PROTECTED_BRANCH]. For example:
http://gdk.test:8080/flightjs/Flight/-/settings/repository/branch_rules?branch=*-group-level - As the administrator you should have all controls in Protect branch section locked with a popover that includes a link to
http://gdk.test:8080/groups/flightjs/-/settings/repository#js-protected-branches-settings. - Now go to Admin / Users and select a user that has a maintainer role in your project. For example:
http://gdk.test:8080/admin/users/thora. Impersonate that user. - Go to a project within that group. Navigate to Settings / Repository / Branch rules / [YOUR_GROUP_LEVEL_PROTECTED_BRANCH]. For example:
http://gdk.test:8080/flightjs/Flight/-/settings/repository/branch_rules?branch=*-group-level - As the maintainer you should have all controls in Protect branch section locked with a popover that links to a documentation on group level protections.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #555424 (closed)
Edited by Paulina Sedlak-Jakubowska





