diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 14:39:10 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 12:05:49 +0200 |
commit | ff3caad4caf46049c8f202849a05fb15a2aaccb8 (patch) | |
tree | 77a75ff9d82a16b4f4637452c8c5fe157e0edcbc /lib/api | |
parent | ae6d0aaae0d8f6251b30a8e5243a98f083f0cac9 (diff) | |
download | gitlab-ce-ff3caad4caf46049c8f202849a05fb15a2aaccb8.tar.gz |
Rename manage_group ability to admin_group for consistency with project.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/group_members.rb | 6 | ||||
-rw-r--r-- | lib/api/groups.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/group_members.rb b/lib/api/group_members.rb index ed54c7f6ff0..ab5b2d6d9a7 100644 --- a/lib/api/group_members.rb +++ b/lib/api/group_members.rb @@ -24,7 +24,7 @@ module API # POST /groups/:id/members post ":id/members" do group = find_group(params[:id]) - authorize! :manage_group, group + authorize! :admin_group, group required_attributes! [:user_id, :access_level] unless validate_access_level?(params[:access_level]) @@ -50,7 +50,7 @@ module API # PUT /groups/:id/members/:user_id put ':id/members/:user_id' do group = find_group(params[:id]) - authorize! :manage_group, group + authorize! :admin_group, group required_attributes! [:access_level] group_member = group.group_members.find_by(user_id: params[:user_id]) @@ -74,7 +74,7 @@ module API # DELETE /groups/:id/members/:user_id delete ":id/members/:user_id" do group = find_group(params[:id]) - authorize! :manage_group, group + authorize! :admin_group, group member = group.group_members.find_by(user_id: params[:user_id]) if member.nil? diff --git a/lib/api/groups.rb b/lib/api/groups.rb index a92abd4b690..8cb9f920975 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -61,7 +61,7 @@ module API # DELETE /groups/:id delete ":id" do group = find_group(params[:id]) - authorize! :manage_group, group + authorize! :admin_group, group group.destroy end |