summaryrefslogtreecommitdiff
path: root/lib/api/groups.rb
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-08-29 16:49:43 +0200
committerRobert Schilling <rschilling@student.tugraz.at>2017-08-29 16:49:43 +0200
commit67c042e4a5603a39494c3c7e407161348d7e85f3 (patch)
tree514ae3b378b6d2502c14bc85f3e33d61a4f299b1 /lib/api/groups.rb
parent2a8dec2c27726cd0af995de97e596eab78e6efbf (diff)
downloadgitlab-ce-67c042e4a5603a39494c3c7e407161348d7e85f3.tar.gz
Respect the default visibility level when creating a group
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r--lib/api/groups.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb
index e56427304a6..15266e9d4e5 100644
--- a/lib/api/groups.rb
+++ b/lib/api/groups.rb
@@ -7,7 +7,9 @@ module API
helpers do
params :optional_params_ce do
optional :description, type: String, desc: 'The description of the group'
- optional :visibility, type: String, values: Gitlab::VisibilityLevel.string_values, desc: 'The visibility of the group'
+ optional :visibility, type: String, values: Gitlab::VisibilityLevel.string_values,
+ default: Gitlab::VisibilityLevel.string_level(Gitlab::CurrentSettings.current_application_settings.default_group_visibility),
+ desc: 'The visibility of the group'
optional :lfs_enabled, type: Boolean, desc: 'Enable/disable LFS for the projects in this group'
optional :request_access_enabled, type: Boolean, desc: 'Allow users to request member access'
optional :share_with_group_lock, type: Boolean, desc: 'Prevent sharing a project with another group within this group'