Updates container registry set up cleanup link
What does this MR do and why?
Updates container registry set up cleanup link
Set up cleanup
link should not be visible on the
container registry list page if the user does not
have permission to view packages & registries settings page.
Also removes Gitlab.com?
check.
The logic has been updated to show the link when project.container_expiration_policy
is either nil
or enabled: false
based on discussion.
Changelog: fixed
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md
- Add a project, and follow steps in http://gdk.test:3000/{group}/{project}/container_registry to publish an image
- Visit
Project > Deploy > Container Registry
- Confirm that link is visible, even when run as self-managed or FOSS-only.
- Enable the policy by clicking on the link.
- Re-visiting
Project > Deploy > Container Registry
should not show the link anymore.
Additionally on the rails console run,
p = Project.find(<project_id>)
p.container_expiration_policy.destroy!
Confirm that link is visible again.
Related to #463205 (closed)