Add error handling for controllers when deleting labels
What does this MR do and why?
Adds error handling for when deleting a locked label through the Label controllers.
How to set up and validate locally
-
Find a project, and a label. Hover over the "Edit" link to get the label's id
-
Update the
lock_on_merge
column of thelabels
table for the id, totrue
. Such asLabel.find(109).update!(lock_on_merge: true)
-
Go list of labels, and try to delete the label.
-
You should see an alert similar to this, indicating the label could not be deleted
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