From 9769c2d7fd0728caf951858162ec7df6f93a8a83 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Tue, 19 Aug 2014 00:23:02 +0200 Subject: Fix #6417: users with group permission should be able to create groups via API --- lib/api/groups.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/api/groups.rb') 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] -- cgit v1.2.1