X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e74ede4659428af77c50057d69a0d08e4e74a6ef..a3be17c575845ad0d84969128850cf87a0b71110:/apps/workbench/app/views/projects/_show_sharing.html.erb diff --git a/apps/workbench/app/views/projects/_show_sharing.html.erb b/apps/workbench/app/views/projects/_show_sharing.html.erb index a5482efc1d..cafaf6dae7 100644 --- a/apps/workbench/app/views/projects/_show_sharing.html.erb +++ b/apps/workbench/app/views/projects/_show_sharing.html.erb @@ -1,7 +1,13 @@ <% uuid_map = {} - [@users, @groups].each do |obj_list| - obj_list.each { |o| uuid_map[o.uuid] = o } + if @share_links + [User, Group].each do |type| + type.limit(10000) + .filter([['uuid','in',@share_links.collect(&:tail_uuid)]]) + .each do |o| + uuid_map[o.uuid] = o + end + end end perm_name_desc_map = {} perm_desc_name_map = {} @@ -13,6 +19,10 @@ perms_json << {value: link_name, text: link_desc} end perms_json = perms_json.to_json + choose_filters = { + "groups" => [["group_class", "=", "role"]], + } + choose_filters.default = [] owner_icon = fa_icon_class_for_uuid(@object.owner_uuid) if owner_icon == "fa-users" owner_icon = "fa-folder" @@ -27,9 +37,11 @@ <%= link_to(send("choose_#{share_class}_path", title: "Share with #{share_class}", + by_project: false, preview_pane: false, multiple: true, limit: 10000, + filters: choose_filters[share_class].to_json, action_method: 'post', action_href: share_with_project_path, action_name: 'Add',