diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-11 12:09:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-11 12:09:49 +0000 |
commit | dcf94a76413ddb50148bdac7b189afb7bffa7580 (patch) | |
tree | b5ecff1d1aea4d3ad95d728531f95f80c00a47ca /app/policies | |
parent | a350f877c4246fee981690388239d1e19e17202a (diff) | |
download | gitlab-ce-dcf94a76413ddb50148bdac7b189afb7bffa7580.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/project_policy.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index 164d73fe332..4dfdbd87a34 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -51,7 +51,11 @@ class ProjectPolicy < BasePolicy desc "Container registry is disabled" condition(:container_registry_disabled, scope: :subject) do - !project.container_registry_enabled + if ::Feature.enabled?(:read_container_registry_access_level, @subject&.namespace, default_enabled: :yaml) + !access_allowed_to?(:container_registry) + else + !project.container_registry_enabled + end end desc "Project has an external wiki" |