Move filtering from API::Groups#find_group_projects into GroupProjectsFinder
Move filtering and ordering done on https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/api/groups.rb#L76 into GroupProjectsFinder
.
The following statements should me moved into GroupProjectsFinder
projects = projects.with_issues_available_for_user(current_user) if params[:with_issues_enabled]
projects = projects.with_merge_requests_enabled if params[:with_merge_requests_enabled]
projects = projects.visible_to_user_and_access_level(current_user, params[:min_access_level]) if params[:min_access_level]
projects = reorder_projects(projects)
The following discussion from gitlab-ce!29866 should be addressed:
-
@felipe_artur started a discussion: (+1 comment) Open follow up gitlab-ce~3011693 issue to move this filtering and ordering into
GroupProjectsFinder
?
Edited by Felipe Cardozo