Prevent enabling security policies past max allowed
What does this MR do and why?
Prevent enabling security policies past max allowed
- disable radio button if max number of security policy types are enabled
- do not prevent users from disabling an enabled policy
Changelog: changed
EE: true
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
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.
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy
- Navigate to a type of policy => Create 5+ enabled policies and 1 policy not enabled of one type
- Navigate to the project/group => Secure => Policies => Select an enabled policy => Click
Edit policy
in the drawer - Verify the policy can be disabled
- Verify the tooltip does not appear when hovering over the radio buttons
- Navigate to the project/group => Secure => Policies => Select a disabled policy => Click
Edit policy
in the drawer - Verify the policy cannot be disabled
- Verify the tooltip appears when hovering over the radio buttons
- Navigate to yaml mode
- Update
enabled
totrue
- Verify the save button is disabled
- Verify the tooltip appears when hovering over the save button
Related to #450752 (closed)
Edited by Alexander Turinske