X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2ff5d889c8d169a85781d13edcf7988fb94cc248..80ada0673ac37cf1d3b70918a214f2ade484ec45:/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 2b0ad7e57a..31c66638db 100644 --- a/apps/workbench/app/controllers/search_controller.rb +++ b/apps/workbench/app/controllers/search_controller.rb @@ -1,6 +1,17 @@ class SearchController < ApplicationController def find_objects_for_index - @objects = Group.contents(limit: @limit, offset: @offset, filters: @filters) + search_what = Group + if params[:project_uuid] + # Special case for "search all things in project": + @filters = @filters.select do |attr, operator, operand| + not (attr == 'owner_uuid' and operator == '=') + end + search_what = Group.find(params[:project_uuid]) + end + @objects = search_what.contents(limit: @limit, + offset: @offset, + filters: @filters, + include_linked: true) super end