Add policy settings into policy drawer
What does this MR do and why?
Add policy settings into policy drawer
- add policy settings at the top of summary
- hide unknown settings as they would not do anything
- add tests
Changelog: added
EE: true
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Note: The heading levels should be "Policy name" > "Summary" > "Overwrite...", but increasing the level of "Summary" means I need to increase the level of the "policy name" to be greater as well as other section headers in both the scan result policy drawer as well as the scan execution policy drawer, which adds a lot to this MR. Thus, for this iteration, the "Overwrite..." heading level is going to be the same as "Summary". The follow-up MR will adjust all header levels appropriately.
Scenario | Settings section | yaml | drawer |
---|---|---|---|
with settings | |||
without settings | No change | N/A |
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 a feature flag that adds settings
echo "Feature.enable(:scan_result_policies_block_force_push)" | rails c
- Navigate to a project/group => Secure => Policies => New policy => Scan Result Policy
- Create a policy with the setting added
- Navigate to the project/group => Secure => Policies => Select newly created policy with settings
- Verify the drawer shows the settings
- Select a policy without settings
- Verify the drawer shows the summary without the setting section
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 #429692 (closed)