summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-15 10:46:54 -0500
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-15 10:46:54 -0500
commit938d5b6fe4bb3d7d6d85188fc5fd1aac77803577 (patch)
treea4e40b2686b9491147ba346161bec948fe2bb616 /app/services
parent3d18b3a0e7e69924d6a5cf39b180b1b133f8c9b0 (diff)
downloadgitlab-ce-938d5b6fe4bb3d7d6d85188fc5fd1aac77803577.tar.gz
Fix http status codes for container registry authentication service
Diffstat (limited to 'app/services')
-rw-r--r--app/services/auth/container_registry_authentication_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index a0cda4adc56..169e0387e85 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -6,9 +6,9 @@ module Auth
return error('not found', 404) unless registry.enabled
if params[:offline_token]
- return error('forbidden', 403) unless current_user
+ return error('forbidden', 401) unless current_user
else
- return error('forbidden', 401) unless scope
+ return error('forbidden', 403) unless scope
end
{ token: authorized_token(scope).encoded }