summaryrefslogtreecommitdiff
path: root/lib/gitlab/auth
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-05-31 15:55:12 +0200
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-06-05 12:26:49 +0200
commit0b81b5ace0dd7c5ba3362238d8be41ce178e1ecc (patch)
treef087313e31a0065cd54da5b74df965af04b390c7 /lib/gitlab/auth
parenta8901ce63dd302d008459321bd4a8007c7c8f7c7 (diff)
downloadgitlab-ce-0b81b5ace0dd7c5ba3362238d8be41ce178e1ecc.tar.gz
Create read_registry scope with JWT auth
This is the first commit doing mainly 3 things: 1. create a new scope and allow users to use it 2. Have the JWTController respond correctly on this 3. Updates documentation to suggest usage of PATs There is one gotcha, there will be no support for impersonation tokens, as this seems not needed. Fixes gitlab-org/gitlab-ce#19219
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r--lib/gitlab/auth/result.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/auth/result.rb b/lib/gitlab/auth/result.rb
index 39b86c61a18..75451cf8aa9 100644
--- a/lib/gitlab/auth/result.rb
+++ b/lib/gitlab/auth/result.rb
@@ -15,6 +15,10 @@ module Gitlab
def success?
actor.present? || type == :ci
end
+
+ def failed?
+ !success?
+ end
end
end
end