Consolidate virtual registry availability checks with memoization
What does this MR do and why?
Consolidate virtual registry availability checks with memoization
Replace scattered availability logic with centralized methods:
- Add
VirtualRegistries.any_registry_available?for unified registry checks - Add
VirtualRegistries::Setting.enabled_for_group?with strong_memoize to avoid repeated DB lookups - Update
show_virtual_registries_setting?helper to delegate to new method - Update cleanup policy resolver to check both Maven and Container registries
- Update controller and sidebar to use
virtual_registry_available?methods - Moved
user_has_access?from individual registry types to parent module
EE: true
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
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 #592706 (closed)
Edited by Rahul Chanila