diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-15 08:53:18 -0500 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-05-15 08:53:18 -0500 |
commit | 3d18b3a0e7e69924d6a5cf39b180b1b133f8c9b0 (patch) | |
tree | 8bb913a8a3f6795e257d9e4fb4fdc02f0c616cdd /app/services | |
parent | b575b2f1ef10c44a59151567aa1aa390f4a94ab1 (diff) | |
parent | dfd0e2450aabc3b5c322c4a4382edb84caa7101b (diff) | |
download | gitlab-ce-3d18b3a0e7e69924d6a5cf39b180b1b133f8c9b0.tar.gz |
Merge branch 'docker-registry' into docker-registry-view
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/auth/container_registry_authentication_service.rb | 6 |
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 |