diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-08-30 10:04:00 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-08-30 10:04:00 +0000 |
commit | 2f1ef2be6f7d0b28341bfbf533c663b2fcbb7465 (patch) | |
tree | 66484dafe8798f2f0f7dde81a69bb8debf442e19 /lib/api/groups.rb | |
parent | f11049ab9131b78c14e95bd95b3073c1eaf59392 (diff) | |
parent | 9edaff0d3547ba9854e69655a4ae4d5095b8a25f (diff) | |
download | gitlab-ce-2f1ef2be6f7d0b28341bfbf533c663b2fcbb7465.tar.gz |
Merge branch '37198-api-doesn-t-respect-default-group-visibility' into 'master'
Respect the default visibility level when creating a group via the API
Closes #37198
See merge request !13903
Diffstat (limited to 'lib/api/groups.rb')
-rw-r--r-- | lib/api/groups.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index ee2ad27837b..8c494a54329 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -7,7 +7,11 @@ 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' |