diff options
Diffstat (limited to 'app/helpers/deploy_tokens_helper.rb')
-rw-r--r-- | app/helpers/deploy_tokens_helper.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/helpers/deploy_tokens_helper.rb b/app/helpers/deploy_tokens_helper.rb index 80a5bb44c69..d6fbe0b6b45 100644 --- a/app/helpers/deploy_tokens_helper.rb +++ b/app/helpers/deploy_tokens_helper.rb @@ -7,8 +7,13 @@ module DeployTokensHelper Rails.env.test? end - def container_registry_enabled?(project) + def container_registry_enabled?(group_or_project) Gitlab.config.registry.enabled && - can?(current_user, :read_container_image, project) + can?(current_user, :read_container_image, group_or_project) + end + + def packages_registry_enabled?(group_or_project) + Gitlab.config.packages.enabled && + can?(current_user, :read_package, group_or_project) end end |