Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/projects_finder.rb')
-rw-r--r--app/finders/projects_finder.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb
index 1aa5245590e..2a781c037f6 100644
--- a/app/finders/projects_finder.rb
+++ b/app/finders/projects_finder.rb
@@ -29,6 +29,7 @@
# repository_storage: string
# not_aimed_for_deletion: boolean
# full_paths: string[]
+# organization_id: int
#
class ProjectsFinder < UnionFinder
include CustomAttributesFilter
@@ -95,6 +96,7 @@ class ProjectsFinder < UnionFinder
collection = by_language(collection)
collection = by_feature_availability(collection)
collection = by_updated_at(collection)
+ collection = by_organization_id(collection)
by_repository_storage(collection)
end
@@ -293,6 +295,10 @@ class ProjectsFinder < UnionFinder
items
end
+ def by_organization_id(items)
+ params[:organization_id].present? ? items.in_organization(params[:organization_id]) : items
+ end
+
def finder_params
return {} unless min_access_level?