Update policy setting feature to match design
What does this MR do and why?
Update policy setting feature to match design
- default setting on new policy to true
- default setting on existing policies to false
- update yaml to match the backend schema
- update tests
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Scenario | Before | After |
---|---|---|
new policy | ||
existing policy |
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 flag
echo "Feature.enable(:scan_result_policy_settings)" | rails c
- Go to a project => Secure -> Policies -> New policy -> Scan Result Policy
- Verify the
Prevent branch protection modification
is checked and the yaml has the following property in it
approval_settings:
block_unprotecting_branches: true
- Verify that changing the status of the checkbox changes the property value
- Create a property without the yaml property
- Go to the project => Secure -> Policies -> Select newly created policy -> Edit policy
- Verify the yaml does not have the property by default and that the checkbox is unchecked
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.
Edited by Alexander Turinske