closes #3637
[arvados.git] / apps / workbench / app / views / projects / _show_sharing.html.erb
index 89a79503c38131e1edf35717e07546f2e01ba67a..cafaf6dae78ad539992cb50516fda73cefae219a 100644 (file)
@@ -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 = {}
@@ -14,7 +20,7 @@
    end
    perms_json = perms_json.to_json
    choose_filters = {
-     "groups" => [["group_class", "=", nil]],
+     "groups" => [["group_class", "=", "role"]],
    }
    choose_filters.default = []
    owner_icon = fa_icon_class_for_uuid(@object.owner_uuid)
@@ -31,6 +37,7 @@
 
   <%= link_to(send("choose_#{share_class}_path",
       title: "Share with #{share_class}",
+      by_project: false,
       preview_pane: false,
       multiple: true,
       limit: 10000,