Refactor Ci::Catalog::Listing to use ProjectsFinder
What does this MR do and why?
In this MR we refactor Ci::Catalog::Listing
to use ProjectsFinder
internally and to take an explicit namespace
to scope resources. Eventually we will remove or repurpose the namespace
scope but for now we want the Listing
to be both backwards compatible with the existing namespace view of the catalog as well as being able to list all resources available to the user.
Benefits that come with ProjectsFinder
:
- Leverage the scenario when the
current_user
is anonymous (nil
) which will allow to display all catalog resources associated to public projects. - Reuse the
search
parameter. - Eventually we can use all existing sorting methods (e.g. by stars, similarity, etc.).
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.
Edited by Laura Montemayor