Skip to content

Adds link to settings from package registry list page

What does this MR do and why?

To increase discoverability of settings, adds a link from the list page to settings in the registry UI

Expected

  • Package Registry at group level will link button to group settings and link to project settings at project level.
  • Settings button should not show for users who are developer or below (and thus cannot see the settings)
  • Navigating to the settings from the feature page opens the corresponding section in the settings.

Context

Had couple of options to pass this value from the backend

  1. Current approach: Pass settings_path via haml if user has admin_package permission.
  2. Alternative approach: We could add the admin_package permission type to project & group userPermissions GraphQL endpoints and check from the frontend. Two downsides to this:

Screenshots or screen recordings

Page Before after
Project page Screenshot_2023-03-29_at_10.14.04_am Screenshot_2023-03-29_at_10.29.22_am
Group page Screenshot_2023-03-29_at_10.14.24_am Screenshot_2023-03-29_at_10.29.51_am

How to set up and validate locally

  1. Visit Project > Packages and registries > Package registry - Link should point to project settings
  2. Visit Group > Packages and registries > Package registry - Link should point to group settings
  3. View same page as user without permission & should be not be able to view link

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #368990 (closed)

Edited by Rahul Chanila

Merge request reports