summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/jwt_controller.rb2
-rw-r--r--app/services/auth/container_registry_authentication_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/jwt_controller.rb b/app/controllers/jwt_controller.rb
index f5aa5397ff1..156ab2811d6 100644
--- a/app/controllers/jwt_controller.rb
+++ b/app/controllers/jwt_controller.rb
@@ -36,7 +36,7 @@ class JwtController < ApplicationController
end
def authenticate_project(login, password)
- if login == 'gitlab_ci_token'
+ if login == 'gitlab-ci-token'
Project.find_by(builds_enabled: true, runners_token: password)
end
end
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index f807b8ec09a..2bbab643e69 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -6,7 +6,7 @@ module Auth
return error('not found', 404) unless registry.enabled
if params[:offline_token]
- return error('unauthorized', 401) unless current_user
+ return error('unauthorized', 401) unless current_user || project
else
return error('forbidden', 403) unless scope
end