Show administrators role for self hosted only
What does this MR do and why?
Show administrators role for self hosted only
It is only possible to add administrators role to a branch protection on self-hosted instances. We therefore add a check to decide if this option should be rendered or not.
Changelog: fixed
Solves: #483114 (comment 2093951495)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Context | Before | After |
---|---|---|
dot_com | ![]() |
![]() |
self-hosted | ![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
In rails console enable the experiment fully
Feature.enable(:edit_branch_rules)
-
Go to Project / Settings / Repository / Branch rules
-
Click View details of a branch rule for certain branch or name pattern.
-
In Allowed to merge section click Edit and make sure you can see Administrators checkbox.
-
Simulate SaaS: point 1 from this instruction +
gdk restart
-
Refresh the branch rules page.
-
In Allowed to merge section click Edit and make sure you can not see Administrators checkbox.