diff options
author | Peter Leitzen <pleitzen@gitlab.com> | 2018-10-12 14:10:34 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-10-12 14:10:34 +0000 |
commit | 4d9ede0be7ea4dae92d224454616f9e65da0a3e1 (patch) | |
tree | b21808ddd85a2114bea1502a6ec06b16894e0ef2 /app/finders/projects_finder.rb | |
parent | 0047869c27f0aede95f20de41c8498b7c23bf08d (diff) | |
download | gitlab-ce-4d9ede0be7ea4dae92d224454616f9e65da0a3e1.tar.gz |
Backport CE changes for Ops Dashboard in EE
Diffstat (limited to 'app/finders/projects_finder.rb')
-rw-r--r-- | app/finders/projects_finder.rb | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb index c2404412006..6ececcd4152 100644 --- a/app/finders/projects_finder.rb +++ b/app/finders/projects_finder.rb @@ -42,17 +42,7 @@ class ProjectsFinder < UnionFinder init_collection end - collection = by_ids(collection) - collection = by_personal(collection) - collection = by_starred(collection) - collection = by_trending(collection) - collection = by_visibilty_level(collection) - collection = by_tags(collection) - collection = by_search(collection) - collection = by_archived(collection) - collection = by_custom_attributes(collection) - collection = by_deleted_status(collection) - + collection = filter_projects(collection) sort(collection) end @@ -66,6 +56,21 @@ class ProjectsFinder < UnionFinder end end + # EE would override this to add more filters + def filter_projects(collection) + collection = by_ids(collection) + collection = by_personal(collection) + collection = by_starred(collection) + collection = by_trending(collection) + collection = by_visibilty_level(collection) + collection = by_tags(collection) + collection = by_search(collection) + collection = by_archived(collection) + collection = by_custom_attributes(collection) + collection = by_deleted_status(collection) + collection + end + # rubocop: disable CodeReuse/ActiveRecord def collection_with_user if owned_projects? |