summaryrefslogtreecommitdiff
path: root/app/services/groups/create_service.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-30 15:09:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-30 15:09:46 +0000
commitdd240e5cc4e0abc4eef8b97962c247dab43e3777 (patch)
treebc0752959bc0713afb555e358bb43d65cf04f48e /app/services/groups/create_service.rb
parent6aa5c04c74d2d70ee7d19ef3a155b2def9dd46de (diff)
downloadgitlab-ce-dd240e5cc4e0abc4eef8b97962c247dab43e3777.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/groups/create_service.rb')
-rw-r--r--app/services/groups/create_service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/groups/create_service.rb b/app/services/groups/create_service.rb
index 51dca43fa4a..4747e1d5ac5 100644
--- a/app/services/groups/create_service.rb
+++ b/app/services/groups/create_service.rb
@@ -15,6 +15,8 @@ module Groups
after_build_hook(@group, params)
+ inherit_group_shared_runners_settings
+
unless can_use_visibility_level? && can_create_group?
return @group
end
@@ -86,6 +88,13 @@ module Groups
params[:visibility_level] = Gitlab::CurrentSettings.current_application_settings.default_group_visibility
end
+
+ def inherit_group_shared_runners_settings
+ return unless @group.parent
+
+ @group.shared_runners_enabled = @group.parent.shared_runners_enabled
+ @group.allow_descendants_override_disabled_shared_runners = @group.parent.allow_descendants_override_disabled_shared_runners
+ end
end
end