diff options
author | Robert Speicher <robert@gitlab.com> | 2016-03-22 01:24:52 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-03-21 21:37:57 -0400 |
commit | c8cc1c16d1a05dd77cedcc1971614fb535beb313 (patch) | |
tree | 0ffbb408e01c63a31edfc3095b5ededd7a7f0d2a /lib/api | |
parent | 939f306ab4b29e08f3710508cde67b82eea802cc (diff) | |
download | gitlab-ce-c8cc1c16d1a05dd77cedcc1971614fb535beb313.tar.gz |
Merge branch 'issue_12658' into 'master'
Add group visibility level
Supersedes https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3051
Closes #12658
See merge request !3323
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/entities.rb | 3 | ||||
-rw-r--r-- | lib/api/groups.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 71197205f34..197e826e5bc 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -85,7 +85,7 @@ module API end class Group < Grape::Entity - expose :id, :name, :path, :description + expose :id, :name, :path, :description, :visibility_level expose :avatar_url expose :web_url do |group, options| @@ -340,6 +340,7 @@ module API expose :session_expire_delay expose :default_project_visibility expose :default_snippet_visibility + expose :default_group_visibility expose :restricted_signup_domains expose :user_oauth_applications expose :after_sign_out_path diff --git a/lib/api/groups.rb b/lib/api/groups.rb index 1a14d870a4a..c165de21a75 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -31,7 +31,7 @@ module API authorize! :create_group, current_user required_attributes! [:name, :path] - attrs = attributes_for_keys [:name, :path, :description] + attrs = attributes_for_keys [:name, :path, :description, :visibility_level] @group = Group.new(attrs) if @group.save |