Skip to content

Refactor Ci::Catalog::Listing to use ProjectsFinder

Fabio Pitino requested to merge fp-refactor-catalog-listing into master

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 :

  1. Leverage the scenario when the current_user is anonymous ( nil ) which will allow to display all catalog resources associated to public projects.
  2. Reuse the search parameter.
  3. 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.

Edited by Laura Montemayor

Merge request reports