Add UI for lock on merged Merge requests
What does this MR do and why?
- Adds checkbox on project/group label edit pages to allow the setting of
lock_on_merge
- Does not show checkbox on label creation pages. This is just an extra protection against accidentally setting it.
- If
lock_on_merge
is set for a label, you can not unset it. This is now enforced in the label update service. - Adds a "Lock on merge" badge in the list of labels.
Screenshots or screen recordings
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:enforce_locked_labels_on_merge)
- Visit a group or project label list, and edit a label. You should see the new checkbox.
- Click and save. Back in the list, you should see the "Lock on merge" badge for that label.
- Edit the same label. The checkbox should be disabled.
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 #408676
Edited by Brett Walker