X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b789ede3e8646a7b8a186905e7c0ff37f6fd1072..b15e80cdfa29e4bd39f207c8e1d5970373d0d7a1:/apps/workbench/app/controllers/search_controller.rb diff --git a/apps/workbench/app/controllers/search_controller.rb b/apps/workbench/app/controllers/search_controller.rb index 31c66638db..6f209a5a9e 100644 --- a/apps/workbench/app/controllers/search_controller.rb +++ b/apps/workbench/app/controllers/search_controller.rb @@ -6,7 +6,12 @@ class SearchController < ApplicationController @filters = @filters.select do |attr, operator, operand| not (attr == 'owner_uuid' and operator == '=') end - search_what = Group.find(params[:project_uuid]) + # Special case for project_uuid is a user uuid: + if ArvadosBase::resource_class_for_uuid(params[:project_uuid]) == User + search_what = User.find params[:project_uuid] + else + search_what = Group.find params[:project_uuid] + end end @objects = search_what.contents(limit: @limit, offset: @offset,