diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-28 03:15:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-28 03:15:57 +0000 |
commit | c5f4c801a6b40e7ee4b96aba20bbec687ccf0502 (patch) | |
tree | ad58e3d5ca9b38d0e86a78143f12362bb35ea1be /app/finders/projects_finder.rb | |
parent | 3235221bc498ca3c80eeca505fb32bf9f237778a (diff) | |
download | gitlab-ce-c5f4c801a6b40e7ee4b96aba20bbec687ccf0502.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders/projects_finder.rb')
-rw-r--r-- | app/finders/projects_finder.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb index 7245bb36ac9..f6db150c5d8 100644 --- a/app/finders/projects_finder.rb +++ b/app/finders/projects_finder.rb @@ -27,6 +27,7 @@ # last_activity_before: datetime # repository_storage: string # without_deleted: boolean +# not_aimed_for_deletion: boolean # class ProjectsFinder < UnionFinder include CustomAttributesFilter @@ -84,6 +85,7 @@ class ProjectsFinder < UnionFinder collection = by_archived(collection) collection = by_custom_attributes(collection) collection = by_deleted_status(collection) + collection = by_not_aimed_for_deletion(collection) collection = by_last_activity_after(collection) collection = by_last_activity_before(collection) by_repository_storage(collection) @@ -203,6 +205,10 @@ class ProjectsFinder < UnionFinder params[:without_deleted].present? ? items.without_deleted : items end + def by_not_aimed_for_deletion(items) + params[:not_aimed_for_deletion].present? ? items.not_aimed_for_deletion : items + end + def by_last_activity_after(items) if params[:last_activity_after].present? items.where("last_activity_at > ?", params[:last_activity_after]) # rubocop: disable CodeReuse/ActiveRecord |