Hide bulk deletion UI of container tags for users without permission
requested to merge 388073-hide-bulk-deletion-ui-of-container-image-tags-for-users-without-the-right-permission into master
What does this MR do and why?
On the container image tags page, the checkbox to select image tags and Delete selected
button are visible and appears as if bulk deletion is possible when user does not have permission.
For users without permission to delete images, this MR passes the hiddenDelete
prop to shared registry-list
component to hide bulk deletion UI of container tags
It also right aligns the publish date content in above scenario.
Screenshots or screen recordings
As user without permission (before):
As user without permission (after):
As user with permission (no change):
How to set up and validate locally
- Choose a public project
- Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md
- Add a few images with tags by following https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-add-images-with-tags-quickly-to-the-registry
- Visit the container registry list page for the project
- clicking one of the images should take you the tags list page
- Bulk deletion UI should be visible
- Copy the tags list URL and visit the URL in an incognito tab
- As a non-logged in user, should not be able to see the bulk deletion selection and also contents should be right-aligned.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #388073 (closed)
Edited by Rahul Chanila