diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2019-02-13 22:51:53 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2019-08-26 10:45:37 +0200 |
commit | 41412f73604159ca735420396df73f7b6eef6f86 (patch) | |
tree | 64bac28e7e965699707331301995801fb5b6d330 /lib | |
parent | 2e83665ed30259a7908350d316605a9c100f0876 (diff) | |
download | gitlab-ce-41412f73604159ca735420396df73f7b6eef6f86.tar.gz |
Add docs and first specs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/labels.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/labels.rb b/lib/api/labels.rb index 5079d95c2b4..9f847c39fac 100644 --- a/lib/api/labels.rb +++ b/lib/api/labels.rb @@ -71,12 +71,12 @@ module API requires :name, type: String, desc: 'The name of the label to be promoted' end post ':id/labels/promote' do - authorize! :admin_label, parent + authorize! :admin_label, user_project - label = find_label(parent, params[:name], include_ancestor_groups: false) + label = find_label(user_project, params[:name], include_ancestor_groups: false) begin - group_label = Labels::PromoteService.new(user_project, current_user).execute(label) + group_label = ::Labels::PromoteService.new(user_project, current_user).execute(label) if group_label present group_label, with: Entities::GroupLabel, current_user: current_user, parent: user_project.group |