Skip to content
Snippets Groups Projects
Unverified Commit 58ceb8e9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Only people who can manage issue can assign labels to it

parent c9f21c96
Branches
Tags
1 merge request!890Update permissions for issue tracker management
Pipeline #
Loading
Loading
@@ -157,7 +157,7 @@ module API
if issue.valid?
# Find or create labels and attach to issue. Labels are valid because
# we already checked its name, so there can't be an error here
unless params[:labels].nil?
if params[:labels] && can?(current_user, :admin_issue, user_project)
issue.remove_labels
# Create and add labels to the new created issue
issue.add_labels_by_names(params[:labels].split(','))
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment