diff options
Diffstat (limited to 'app/finders/autocomplete/routes_finder.rb')
-rw-r--r-- | app/finders/autocomplete/routes_finder.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/finders/autocomplete/routes_finder.rb b/app/finders/autocomplete/routes_finder.rb index 858a4b69376..ecede0c1c1c 100644 --- a/app/finders/autocomplete/routes_finder.rb +++ b/app/finders/autocomplete/routes_finder.rb @@ -13,7 +13,7 @@ module Autocomplete end def execute - return [] if @search.blank? + return Route.none if @search.blank? Route .for_routable(routables) @@ -30,7 +30,7 @@ module Autocomplete class NamespacesOnly < self def routables - return Namespace.without_project_namespaces if current_user.admin? + return Namespace.without_project_namespaces if current_user.can_admin_all_resources? current_user.namespaces end @@ -38,7 +38,7 @@ module Autocomplete class ProjectsOnly < self def routables - return Project.all if current_user.admin? + return Project.all if current_user.can_admin_all_resources? current_user.projects end |