Skip to content

Rename setting to `block_branch_modification`

Alexander Turinske requested to merge 432090-rename-setting into master

What does this MR do and why?

Rename setting to block_branch_modification

  • the previous setting name block_unprotecting_branches was not quite accurate
  • the new setting name better reflects the action it is taking

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Scanario Screenshot
Setting Screenshot_2023-11-16_at_09.00.40
Delete Screenshot_2023-11-16_at_09.02.37
Default Screenshot_2023-11-16_at_09.02.17
Protected Screenshot_2023-11-16_at_09.01.54

How to set up and validate locally

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

  1. Upload a GitLab Ultimate license
  2. Enable the feature flags
echo "Feature.enable(:scan_result_policies_block_unprotecting_branches)" | rails c
  1. Go to Project => Settings => Repository => Branch defaults => Make main the default branch
  2. Go to Secure -> Policies -> New policy -> Scan Result Policy
  3. Verify the setting appears at the bottom
  4. Create a policy with the setting set to true
  5. Go to the Project => Settings => Repository => Branch defaults
  6. Verify the default branch cannot be changed and a popover shows up over the button
  7. Go to the Project => Settings => Repository => Protected branches
  8. Verify the protected branches in the policy cannot be unprotected
  9. Go to Code => Branches
  10. Verify the protected branches in the policy cannot be deleted

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #432090 (closed)

Edited by Alexander Turinske

Merge request reports