diff options
Diffstat (limited to 'app/finders/autocomplete/routes_finder.rb')
-rw-r--r-- | app/finders/autocomplete/routes_finder.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/finders/autocomplete/routes_finder.rb b/app/finders/autocomplete/routes_finder.rb index ecede0c1c1c..ed807d3a295 100644 --- a/app/finders/autocomplete/routes_finder.rb +++ b/app/finders/autocomplete/routes_finder.rb @@ -19,6 +19,7 @@ module Autocomplete .for_routable(routables) .sort_by_path_length .fuzzy_search(@search, [:path]) + .allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/421843') .limit(LIMIT) # rubocop: disable CodeReuse/ActiveRecord end @@ -30,9 +31,11 @@ module Autocomplete class NamespacesOnly < self def routables - return Namespace.without_project_namespaces if current_user.can_admin_all_resources? - - current_user.namespaces + if current_user.can_admin_all_resources? + Namespace.without_project_namespaces + else + current_user.namespaces + end.allow_cross_joins_across_databases(url: "https://gitlab.com/gitlab-org/gitlab/-/issues/420046") end end |