summaryrefslogtreecommitdiff
path: root/app/services/ci/runners/register_runner_service.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-12 15:13:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-12 15:13:54 +0000
commit98638cd5e43611aac2193a5c2f80f72374040430 (patch)
tree6605f0f284efed1d05708b3799f093eb5e305a8f /app/services/ci/runners/register_runner_service.rb
parent43d816ebc20da6ff959176248c70d8c4c7c9345a (diff)
downloadgitlab-ce-98638cd5e43611aac2193a5c2f80f72374040430.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/ci/runners/register_runner_service.rb')
-rw-r--r--app/services/ci/runners/register_runner_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/ci/runners/register_runner_service.rb b/app/services/ci/runners/register_runner_service.rb
index 8921acb9ff1..0c13c32e236 100644
--- a/app/services/ci/runners/register_runner_service.rb
+++ b/app/services/ci/runners/register_runner_service.rb
@@ -14,7 +14,9 @@ module Ci
return ServiceResponse.error(message: 'invalid token supplied', http_status: :forbidden) unless attrs_from_token
unless registration_token_allowed?(attrs_from_token)
- return ServiceResponse.error(message: 'runner registration disallowed', http_status: :forbidden)
+ return ServiceResponse.error(
+ message: 'runner registration disallowed',
+ reason: :runner_registration_disallowed)
end
runner = ::Ci::Runner.new(attributes.merge(attrs_from_token))