Protected containers: Badge "protected" in container detail page
requested to merge gitlab-community/gitlab:441346-gerardo-navarro-protected-containers-show-protection-info-in-container-detail-page into master
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
- Add badge "protected" in the detail page of the container repository to indicate if there is a container protection rule for the given container repository
- This feature and changes were motivated and identical to a previous MR (related to protected packages), see !146206 (merged)
- Considering feature flag
container_registry_protected_containers
to enable / disable the badge "protected"
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.
MR Checklist (@gerardo-navarro)
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
Screenshots or screen recordings
With this MR, we add the badge "protected".
Before | After |
---|---|
How to set up and validate locally
- Push a container image to a container respository path
- Go to the container repository overview page: http://gdk.test:3000/flightjs/Flight/container_registry
- Select one container repository und go to its detail page: http://gdk.test:3000/flightjs/Flight/container_registry/1
- On the detail page, you should not see the badge "protected" (below the name of the container repository)
- Go to the project settings and protect the container repository (that you have visited before): http://gdk.test:3000/flightjs/Flight/-/settings/packages_and_registries
- Reload the detail page of the container repository: http://gdk.test:3000/flightjs/Flight/container_registry/1
- On the detail page, you should see the badge "protected".
Related to #441346 (closed)
Edited by Gerardo Navarro