Skip to content
Snippets Groups Projects

Improve performance of the global search for issuables

All threads resolved!
Compare and Show latest version
13 files
+ 51
63
Compare changes
  • Side-by-side
  • Inline
Files
13
@@ -41,16 +41,14 @@ 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, min_access_level)]
[shared_projects.public_or_visible_to_user(current_user)]
elsif only_owned?
[owned_projects.public_or_visible_to_user(current_user, min_access_level)]
[owned_projects.public_or_visible_to_user(current_user)]
else
[
owned_projects.public_or_visible_to_user(current_user, min_access_level),
shared_projects.public_or_visible_to_user(current_user, min_access_level)
owned_projects.public_or_visible_to_user(current_user),
shared_projects.public_or_visible_to_user(current_user)
]
end
end
Loading