Skip to content
Snippets Groups Projects

Improve performance of the global search for issuables

11 files
+ 119
136
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -41,14 +41,16 @@ def init_collection
end
def collection_with_user
min_access_level = params[:min_access_level].presence
if only_shared?
[shared_projects.public_or_visible_to_user(current_user)]
[shared_projects.public_or_visible_to_user(current_user, min_access_level)]
elsif only_owned?
[owned_projects.public_or_visible_to_user(current_user)]
[owned_projects.public_or_visible_to_user(current_user, min_access_level)]
else
[
owned_projects.public_or_visible_to_user(current_user),
shared_projects.public_or_visible_to_user(current_user)
owned_projects.public_or_visible_to_user(current_user, min_access_level),
shared_projects.public_or_visible_to_user(current_user, min_access_level)
]
end
end
Loading