Add "Prevent Force Pushing" setting
What does this MR do and why?
Add "Prevent Force Pushing" setting
- hide behind ":scan_result_policies_block_force_push" feature flag
- ensure feature flag is independent of both the ":scanResultPoliciesBlockUnprotectingBranches" and ":scanResultAnyMergeRequest" feature flags and works with them
- update tests
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable a feature flag that adds settings
echo "Feature.enable(:scan_result_policies_block_force_push)" | rails c
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy => Scan Result Policy
- Verify the setting displays and can be modified and reflected in the yaml correctly
- Select a policy type
- Verify the setting displays and can be modified and reflected in the yaml
- Modify various feature flags and ensure they interact appropriately
echo "Feature.disable(:scan_result_policies_block_unprotecting_branches) && Feature.disable(:scan_result_any_merge_request)" | rails c
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 #428232 (closed)
Edited by Alexander Turinske