diff options
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/create_service.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb index 61bd50616b8..8cc31200689 100644 --- a/app/services/groups/create_service.rb +++ b/app/services/groups/create_service.rb @@ -9,6 +9,7 @@ module Groups def execute remove_unallowed_params + set_visibility_level @group = Group.new(params) @@ -68,6 +69,12 @@ module Groups true end + + def set_visibility_level + return if visibility_level.present? + + params[:visibility_level] = Gitlab::CurrentSettings.current_application_settings.default_group_visibility + end end end |