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
No related branches found
No related tags found
No related merge requests found
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.
Finish editing this message first!
Please register or to comment