Loading
Use label permissions in the group labels controller
What does this MR do and why?
Groups::LabelsController still checked admin_label. This MR switches it to the specific label permissions, the same way the project labels controller was switched. Nobody gains or loses access. Reporter and Planner had admin_label and now also get the specific permissions in the group scope.
- Controller checks
create_labelon the group (new, create), andupdate_label(edit, update) anddelete_label(destroy) on both the group and the label. A label can belong to an ancestor group, so both checks stay, same as before. - Reporter and Planner get
create_label,update_label,delete_labelin the group scope. - Archived groups block the new permissions the same way they blocked
admin_label.
No changelog, since user-facing behavior does not change.
References
- Related to #566177
- Depends on !257921 (merged)
Screenshots or screen recordings
No UI change.
How to set up and validate locally
bundle exec rspec spec/controllers/groups/labels_controller_spec.rb spec/policies/group_policy_spec.rb
bundle exec rake gitlab:permissions:validateMR 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.