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
-
Current approach: Pass
settings_path
via haml if user hasadmin_package
permission. -
Alternative approach: We could add the
admin_package
permission type to project & groupuserPermissions
GraphQL endpoints and check from the frontend. Two downsides to this:
- We'd still need to pass
settings_path
via haml for the link - Would have to split this MR into backend & frontend and release in separate milestones to support multi version compatibility
Screenshots or screen recordings
Page | Before | after |
---|---|---|
Project page | ||
Group page |
How to set up and validate locally
- Visit Project > Packages and registries > Package registry - Link should point to project settings
- Visit Group > Packages and registries > Package registry - Link should point to group settings
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #368990 (closed)
Edited by Rahul Chanila