Add warn mode action option
What does this MR do and why?
Add warn mode action option
- disable warn mode action in enforce mode (undoing some of the work from Add an enforcement option for policy editor (!202806 - merged))
- allow for warn mode action to be deleted (undoing some of the work from Add an enforcement option for policy editor (!202806 - merged))
- allow for multiple warn mode actions to be added
- update tests
EE: true
References
Screenshots or screen recordings
Scenario | Screenshot |
---|---|
Warn mode |
![]() ![]() |
Enforce mode | ![]() |
How to set up and validate locally
- Upload a GitLab Ultimate license
- Enable the
security_policy_approval_warn_mode
feature flag (http://gdk.test:3000/rails/features) - Navigate to a project/group => Secure => Policies => New policy => Merge Request Approval Policy
- Verify the policy starts in
enforcement_type
=warn
- Verify the
warn
action can be added multiple times - Verify the
warn
action can be removed - Change the enforcement type and the yaml value is updated to
enforce
- Verify the user cannot add the
warn
action inenforce
mode
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #575739
Edited by Alexander Turinske