Commit 22c822d2 authored by Ruben Davila's avatar Ruben Davila

Merge branch 'master' into 8-12-stable-ee

Conflicts:
	lib/api/entities.rb
	lib/api/groups.rb
parents a5b622ae 3e684d89
......@@ -132,13 +132,13 @@ module API
class Group < Grape::Entity
expose :id, :name, :path, :description, :visibility_level
expose :lfs_enabled?, as: :lfs_enabled
expose :ldap_cn, :ldap_access
expose :ldap_group_links,
using: Entities::LdapGroupLink,
if: lambda { |group, options| group.ldap_group_links.any? }
expose :lfs_enabled?, as: :lfs_enabled
expose :avatar_url
expose :web_url
end
......
......@@ -27,16 +27,16 @@ 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
# membership_lock (optional, boolean) - Prevent adding new members to project membership within this group
# share_with_group_lock (optional, boolean) - Prevent sharing a project with another group within this 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, :lfs_enabled, :membership_lock, :share_with_group_lock]
attrs = attributes_for_keys [:name, :path, :description, :visibility_level, :membership_lock, :share_with_group_lock, :lfs_enabled]
@group = Group.new(attrs)
if @group.save
......@@ -73,7 +73,7 @@ module API
group = find_group(params[:id])
authorize! :admin_group, group
attrs = attributes_for_keys [:name, :path, :description, :visibility_level, :lfs_enabled, :membership_lock, :share_with_group_lock]
attrs = attributes_for_keys [:name, :path, :description, :visibility_level, :membership_lock, :share_with_group_lock, :lfs_enabled]
if ::Groups::UpdateService.new(group, current_user, attrs).execute
present group, with: Entities::GroupDetail
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment