Skip to content

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

  1. Enable container registry in GDK
  2. Login as admin
  3. Visit any project.
  4. Link on the sidebar for Settings > Packages & Registries should be present & should be able to visit the page.

Disabled Container registry

  1. Disable container registry in GDK
  2. Login as admin
  3. Visit any project.
  4. 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.

Related to #352566 (closed)

Edited by Rahul Chanila

Merge request reports