Only people who can manage issue can assign labels to it
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
c9f21c9691
commit
58ceb8e950
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ module API
|
||||||
if issue.valid?
|
if issue.valid?
|
||||||
# Find or create labels and attach to issue. Labels are valid because
|
# 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
|
# 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
|
issue.remove_labels
|
||||||
# Create and add labels to the new created issue
|
# Create and add labels to the new created issue
|
||||||
issue.add_labels_by_names(params[:labels].split(','))
|
issue.add_labels_by_names(params[:labels].split(','))
|
||||||
|
|
Loading…
Reference in a new issue