summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/groups.rb')
-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]