diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-12-06 22:07:47 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2018-01-04 22:28:10 +0300 |
commit | 5e148d4e931792733400f59864e1aa886ef55953 (patch) | |
tree | 3e08b1776015895dcb242909df01f5db60265d7e /lib/api/labels.rb | |
parent | e5a9b9a14d32d890dea20403c977dfd569eb3e17 (diff) |
EE-BACKPORT group boards
Diffstat (limited to 'lib/api/labels.rb')
-rw-r--r-- | lib/api/labels.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb index e41a1720ac1..81eaf56e48e 100644 --- a/lib/api/labels.rb +++ b/lib/api/labels.rb @@ -15,7 +15,7 @@ module API use :pagination end get ':id/labels' do - present paginate(available_labels), with: Entities::Label, current_user: current_user, project: user_project + present paginate(available_labels_for(user_project)), with: Entities::Label, current_user: current_user, project: user_project end desc 'Create a new label' do @@ -30,7 +30,7 @@ module API post ':id/labels' do authorize! :admin_label, user_project - label = available_labels.find_by(title: params[:name]) + label = available_labels_for(user_project).find_by(title: params[:name]) conflict!('Label already exists') if label priority = params.delete(:priority) |