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_modefeature 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
warnaction can be added multiple times - Verify the
warnaction can be removed - Change the enforcement type and the yaml value is updated to
enforce - Verify the user cannot add the
warnaction inenforcemode
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 (closed)
Edited by Alexander Turinske


