FE: Add warning about required approvals
Why are we doing this work
- users want to know how their changes to the settings affects the policy
From &9696 (comment 1506117258):
@mcavoj @sashi_kumar Thank you for the discussion, I think what @g.hickman propose for now makes sense. I only want to add a warning/error in the following case. Let me know what you all think.
Relevant links
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
Verification steps
- Upload a GitLab Ultimate license
- Navigate to a project/group => Secure => Policies => New policy => Scan Result Policy
- Remove the action section (e.g. remove the
actions:
object from the yaml) - Ensure some of the settings are checked
- Verify there is a warning above the buttons at the bottom saying the following
- Title:
Only override settings will take effect
- Description:
You didn't choose any approvers, when the condition met in a MR, only the override project apprval settings will take effect. There will be no required approvers
- Uncheck all of the settings
- Verify there is an error above the buttons at the bottom saying the following
- Title: Can't create a policy completely empty action`
- Description:
There is no overwriting approval settings nor required approval set up, you can't create a policy which does nothing.
- Verify the
Configure with merge request
button is disabled
Edited by Alexander Turinske