Refactors project packages & registry settings access
What does this MR do and why?
Refactors access related code for Project > Settings > Packages & Registry
Currently access to the above path is restricted only when Container registry
is enabled.
This is part 1 of 3 MRs for #352566 (closed) which adds Package registry
settings to the same page.
Adds policy :view_package_registry_project_settings
This MR should not change any behavior, and supports future iterations.
Screenshots or screen recordings
No change before/after
How to set up and validate locally
Enabled Container registry
- Enable container registry in GDK
- Login as admin
- Visit any project.
- Link on the sidebar for Settings > Packages & Registries should be present & should be able to visit the page.
Disabled Container registry
- Disable container registry in GDK
- Login as admin
- Visit any project.
- Should not be able to see link to Settings > Packages & Registries on the sidebar & should not be able to visit the page via URL
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.
Related to #352566 (closed)
Edited by Rahul Chanila