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-14 22:28:08 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-05-14 22:28:08 +0300
commit5c19476286eb63325cbae7b1a21966e55712f367 (patch)
tree6a321c7700603c6c8a0512df330141d8a7417659 /app/services/auth
parent9eeea4245b3c97505ec5f877b282a80dcd2da5fb (diff)
parent715a8cfa2f4639bf36b604f6e3eb2814187367c0 (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.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index fcd02c02868..45b163d213e 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -67,6 +67,8 @@ module Auth
end
def can_access?(requested_project, requested_action)
+ return false unless requested_project.container_registry_enabled?
+
case requested_action
when 'pull'
requested_project == project || can?(current_user, :read_container_registry, requested_project)