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:
authorMayra Cabrera <mcabrera@gitlab.com>2018-04-10 10:31:30 +0300
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-04-10 10:31:30 +0300
commit3e35f65394fad201a9277667772f3ad9c6940d07 (patch)
treea29edb1313437b8a242d01142a8a00c94dc6cd2f /app/services/auth
parentbc841c7db9c37f6ea91911cb921db07608d8bdec (diff)
Verify that deploy token has valid access when pulling container registry image
Diffstat (limited to 'app/services/auth')
-rw-r--r--app/services/auth/container_registry_authentication_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index 8f050072f74..f28cddb2af3 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -149,7 +149,8 @@ module Auth
def deploy_token_can_pull?(requested_project)
has_authentication_ability?(:read_container_image) &&
current_user.is_a?(DeployToken) &&
- current_user.has_access_to?(requested_project)
+ current_user.has_access_to?(requested_project) &&
+ current_user.read_registry?
end
##