Consolidate virtual registry setting render checks
What does this MR do and why?
This is a follow up from a previous MR comment.
This MR consolidates the checks that are being pushed to the frontend into one boolean value that is pushed to the frontend.
Adds the method to the group settings helpers, and pushes the should_render_virtual_registries_settings value from the package and registries controller.
Updates the frontend to use the value in the group settings app component.
References
Screenshots or screen recordings
n/a Existing UI does not change
How to set up and validate locally
- Switch to this branch and open the rails console
gdk rails c - Check feature flags are enabled.
[2] pry(main)> ::Feature.enabled?(:maven_virtual_registry)
=> true
[3] pry(main)> ::Feature.enabled?(:ui_for_virtual_registries)
=> true
- In the UI, go to the settings for a top level group, e.g
http://gdk.test:3000/groups/twitter/-/settings/packages_and_registries. We should still be able to see the enable/disable toggle.
- Test disabling a feature flag and refresh page. The settings toggle should not appear.
[4] pry(main)> Feature.disable(:maven_virtual_registry)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #548155
Edited by Fiona McCawley

