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:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-05-15 16:53:18 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-15 16:53:18 +0300
commit3d18b3a0e7e69924d6a5cf39b180b1b133f8c9b0 (patch)
tree8bb913a8a3f6795e257d9e4fb4fdc02f0c616cdd /app/services/auth
parentb575b2f1ef10c44a59151567aa1aa390f4a94ab1 (diff)
parentdfd0e2450aabc3b5c322c4a4382edb84caa7101b (diff)
Merge branch 'docker-registry' into docker-registry-view
Diffstat (limited to 'app/services/auth')
-rw-r--r--app/services/auth/container_registry_authentication_service.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index 9bfc1085fb9..a0cda4adc56 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -7,10 +7,10 @@ module Auth
if params[:offline_token]
return error('forbidden', 403) unless current_user
+ else
+ return error('forbidden', 401) unless scope
end
- return error('forbidden', 401) unless scope
-
{ token: authorized_token(scope).encoded }
end
@@ -32,7 +32,7 @@ module Auth
token.issuer = registry.issuer
token.audience = params[:service]
token.subject = current_user.try(:username)
- token[:access] = accesses
+ token[:access] = accesses.compact
token
end