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:
Diffstat (limited to 'app/models/project_feature.rb')
-rw-r--r--app/models/project_feature.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project_feature.rb b/app/models/project_feature.rb
index 168646bbe41..053ccfac050 100644
--- a/app/models/project_feature.rb
+++ b/app/models/project_feature.rb
@@ -162,6 +162,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