Rename setting to `block_branch_modification`
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 | |
Delete | |
Default | |
Protected |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Enable the feature flags
echo "Feature.enable(:scan_result_policies_block_unprotecting_branches)" | rails c
- Go to Project => Settings => Repository => Branch defaults => Make
main
the default branch - Go to Secure -> Policies -> New policy -> Scan Result Policy
- Verify the setting appears at the bottom
- Create a policy with the setting set to true
- Go to the Project => Settings => Repository => Branch defaults
- Verify the default branch cannot be changed and a popover shows up over the button
- Go to the Project => Settings => Repository => Protected branches
- Verify the protected branches in the policy cannot be unprotected
- Go to Code => Branches
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #432090 (closed)
Edited by Alexander Turinske