summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 14:31:00 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-03 14:31:00 +0300
commita7ddff87481138e43609bd12acbb76da2ec8dd7a (patch)
tree320a694eb84b6e175888d8ec326cc38039eb479c /lib/api
parente097812f5778b87fc7fd285908e1ab47ff523c91 (diff)
parent9769c2d7fd0728caf951858162ec7df6f93a8a83 (diff)
downloadgitlab-ce-a7ddff87481138e43609bd12acbb76da2ec8dd7a.tar.gz
Merge pull request #9066 from jirutka/fix-6417
Fix #6417: users with group permission should be able to create groups via API
Diffstat (limited to 'lib/api')
-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 8cb9f920975..f768c750402 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]