diff options
Diffstat (limited to 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 4be6cd4276b..cfafb0443b9 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -743,6 +743,7 @@ module ProjectsHelper operations#show badges#index pages#show + packages_and_registries#index ] end @@ -782,6 +783,16 @@ module ProjectsHelper end def settings_container_registry_expiration_policy_available?(project) + Feature.disabled?(:sidebar_refactor) && + can_destroy_container_registry_image?(current_user, project) + end + + def settings_packages_and_registries_enabled?(project) + Feature.enabled?(:sidebar_refactor) && + can_destroy_container_registry_image?(current_user, project) + end + + def can_destroy_container_registry_image?(current_user, project) Gitlab.config.registry.enabled && can?(current_user, :destroy_container_image, project) end |