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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-18 21:10:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-18 21:10:10 +0300
commit85f7fa54f404f28b0f351c2be0f7a6e9d74fe65f (patch)
treeb0f4a7578f374185fb649be904641cd79baa2ca0 /lib/gitlab/auth.rb
parenta8a9c520128bffc1157db4dc1beaa215fc731c80 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r--lib/gitlab/auth.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index 960da54a943..332d0bc1478 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -220,6 +220,9 @@ module Gitlab
return unless token && login
return if login != token.username
+ # Registry access (with jwt) does not have access to project
+ return if project && !token.has_access_to?(project)
+
scopes = abilities_for_scopes(token.scopes)
if valid_scoped_token?(token, all_available_scopes)