Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-26 21:06:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-26 21:06:29 +0300
commite66d6781ef36e39d15b1b9bc84cc30e87969edad (patch)
tree0165ff173dee501a55115d605dd8fa8a09f8d313 /app/services/groups
parent4e9f718e190a944c39fda2a178eb8b901e7e6ec7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups')
-rw-r--r--app/services/groups/create_service.rb7
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