diff options
Diffstat (limited to 'app/models/project_feature.rb')
-rw-r--r-- | app/models/project_feature.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/project_feature.rb b/app/models/project_feature.rb index 23b0665cb74..772a82fa173 100644 --- a/app/models/project_feature.rb +++ b/app/models/project_feature.rb @@ -163,6 +163,12 @@ class ProjectFeature < ApplicationRecord end end + def public_packages? + return false unless Gitlab.config.packages.enabled + + package_registry_access_level == PUBLIC || project.public? + end + private def set_pages_access_level @@ -200,7 +206,7 @@ class ProjectFeature < ApplicationRecord override :resource_member? def resource_member?(user, feature) - project.team.member?(user, ProjectFeature.required_minimum_access_level(feature)) + project.member?(user, ProjectFeature.required_minimum_access_level(feature)) end end |