Merge branch 'docker-registry' into docker-registry-view

This commit is contained in:
Kamil Trzcinski 2016-05-14 14:28:08 -05:00
commit 5c19476286
1 changed files with 2 additions and 0 deletions

View File

@ -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)