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>2023-01-04 21:08:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-04 21:08:48 +0300
commit9c66c38ab6ce56cfe06eca21f717977f1684f08c (patch)
tree84fc6c7ebd49b8b6f73371b30b641d582fdb9725 /app/models/namespace_setting.rb
parent333d6f857ee7d329d4c53c874e6858679306442f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace_setting.rb')
-rw-r--r--app/models/namespace_setting.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/namespace_setting.rb b/app/models/namespace_setting.rb
index 5081d5cdafe..7f65fb3a378 100644
--- a/app/models/namespace_setting.rb
+++ b/app/models/namespace_setting.rb
@@ -69,6 +69,12 @@ class NamespaceSetting < ApplicationRecord
!self.class.where(namespace_id: namespace.ancestors, runner_registration_enabled: false).exists?
end
+ def allow_runner_registration_token?
+ settings = Gitlab::CurrentSettings.current_application_settings
+
+ settings.allow_runner_registration_token && namespace.root_ancestor.allow_runner_registration_token
+ end
+
private
def all_ancestors_allow_diff_preview_in_email?