summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2014-08-19 00:23:02 +0200
committerJakub Jirutka <jakub@jirutka.cz>2015-03-31 18:32:24 +0200
commit9769c2d7fd0728caf951858162ec7df6f93a8a83 (patch)
treeb7b5d800c0a5c6fe5382788d2cee92aff298fe95 /lib
parent0191857fac465fbfb4acad1b923c29f3b05529aa (diff)
downloadgitlab-ce-9769c2d7fd0728caf951858162ec7df6f93a8a83.tar.gz
Fix #6417: users with group permission should be able to create groups via API
Diffstat (limited to 'lib')
-rw-r--r--lib/api/groups.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index a92abd4b690..218cec40884 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -20,7 +20,7 @@ module API
present @groups, with: Entities::Group
end
- # Create group. Available only for admin
+ # Create group. Available only for users who can create groups.
#
# Parameters:
# name (required) - The name of the group
@@ -28,7 +28,7 @@ module API
# Example Request:
# POST /groups
post do
- authenticated_as_admin!
+ authorize! :create_group, current_user
required_attributes! [:name, :path]
attrs = attributes_for_keys [:name, :path, :description]