Adds confirmation prompt to container image repository delete modal
requested to merge 406751-require-users-to-confirm-container-repository-name-prior-to-deletion into master
What does this MR do and why?
Adds an additional layer of safety before deletion of container images by adding a confirmation prompt when attempting to delete image repository.
Implements !66612 (merged) on container registry list page.
The input prompt is changed from project name to the following:
Repository full path | Confirmation |
---|---|
mygroup/myproject (base repository) |
myproject |
mygroup/myproject/foo (sub repository) |
foo |
mygroup/myproject/foo/bar (sub repository) |
foo/bar |
Screenshots or screen recordings
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
- In the terminal, run these commands to push images to test base repository & sub repository
$ docker pull hello-world $ docker tag hello-world 127.0.0.1:5000/<project-path> && docker push 127.0.0.1:5000/<project-path> $ docker tag hello-world 127.0.0.1:5000/<project-path>/testing && docker push 127.0.0.1:5000/<project-path>/testing $ docker tag hello-world 127.0.0.1:5000/<project-path>/testing/hello-world && docker push 127.0.0.1:5000/<project-path>/testing/hello-world
- Visit the container registry list page for the project
- Click the delete icon to show the modal & confirm it shows the input prompt
- click through the image repository & confirm the modal works similarly
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.
Fixes #406751 (closed)
Edited by Rahul Chanila