X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/09e3c7102376790a2a6bebb0c77f43fa271f6d74..e69f517dbd5ad9bac104d42479d8ef2f515b398e:/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..447f416aa2 100644 --- a/apps/workbench/app/controllers/search_controller.rb +++ b/apps/workbench/app/controllers/search_controller.rb @@ -6,16 +6,22 @@ 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, - filters: @filters, - include_linked: true) + filters: @filters) super end def next_page_href with_params={} - super with_params.merge(last_object_class: @objects.last.class.to_s) + super with_params.merge(last_object_class: @objects.last.class.to_s, + project_uuid: params[:project_uuid], + filters: @filters.to_json) end end