diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-09-02 02:49:48 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-09-15 20:27:32 +0300 |
commit | fd621429508ba3877e27a8187f0d491576b65ad0 (patch) | |
tree | 827492a8a13dff86ae72705419b2d4045f543598 /lib/api | |
parent | f8bd9625f44ae4233c14e473c57becfb7ff15ca9 (diff) |
Added group-specific setting for LFS.
Groups can enable/disable LFS, but this setting can be overridden at the project level. Admin only
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 2 | ||||
-rw-r--r-- | lib/api/groups.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 4f736e4ec2b..1529a44f58d 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -120,7 +120,7 @@ module API end class Group < Grape::Entity - expose :id, :name, :path, :description, :visibility_level + expose :id, :name, :path, :description, :visibility_level, :lfs_enabled expose :avatar_url expose :web_url end diff --git a/lib/api/groups.rb b/lib/api/groups.rb index d2df77238d5..60ac9bdfa33 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -27,13 +27,14 @@ module API # path (required) - The path of the group # description (optional) - The description of the group # visibility_level (optional) - The visibility level of the group + # lfs_enabled (optional) - Enable/disable LFS for the projects in this group # Example Request: # POST /groups post do authorize! :create_group required_attributes! [:name, :path] - attrs = attributes_for_keys [:name, :path, :description, :visibility_level] + attrs = attributes_for_keys [:name, :path, :description, :visibility_level, :lfs_enabled] @group = Group.new(attrs) if @group.save @@ -51,13 +52,14 @@ module API # path (optional) - The path of the group # description (optional) - The description of the group # visibility_level (optional) - The visibility level of the group + # lfs_enabled (optional) - Enable/disable LFS for the projects in this group # Example Request: # PUT /groups/:id put ':id' do group = find_group(params[:id]) authorize! :admin_group, group - attrs = attributes_for_keys [:name, :path, :description, :visibility_level] + attrs = attributes_for_keys [:name, :path, :description, :visibility_level, :lfs_enabled] if ::Groups::UpdateService.new(group, current_user, attrs).execute present group, with: Entities::GroupDetail |