Skip to content

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 Screenshot_2024-09-06_at_17.17.05 Screenshot_2024-09-06_at_16.32.34
self-hosted Screenshot_2024-09-06_at_17.17.05 Screenshot_2024-09-06_at_17.17.05

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. In rails console enable the experiment fully

    Feature.enable(:edit_branch_rules)
  2. Go to Project / Settings / Repository / Branch rules

  3. Click View details of a branch rule for certain branch or name pattern.

  4. In Allowed to merge section click Edit and make sure you can see Administrators checkbox.

  5. Simulate SaaS: point 1 from this instruction + gdk restart

  6. Refresh the branch rules page.

  7. In Allowed to merge section click Edit and make sure you can not see Administrators checkbox.

Merge request reports

Loading