summaryrefslogtreecommitdiff
path: root/lib/api/helpers/runner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/runner.rb')
-rw-r--r--lib/api/helpers/runner.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers/runner.rb b/lib/api/helpers/runner.rb
index 9ec9b5e1e35..a022d1a56ac 100644
--- a/lib/api/helpers/runner.rb
+++ b/lib/api/helpers/runner.rb
@@ -14,6 +14,10 @@ module API
ActiveSupport::SecurityUtils.secure_compare(params[:token], Gitlab::CurrentSettings.runners_registration_token)
end
+ def runner_registrar_valid?(type)
+ Feature.disabled?(:runner_registration_control) || Gitlab::CurrentSettings.valid_runner_registrars.include?(type)
+ end
+
def authenticate_runner!
forbidden! unless current_runner