[ARVADOS] updated: b82d80addf80b9ead7c63f85f72613042b3b2c51

git at public.curoverse.com git at public.curoverse.com
Wed Aug 6 18:14:49 EDT 2014


Summary of changes:
 apps/workbench/app/views/projects/_show_sharing.html.erb |  5 +++++
 apps/workbench/test/integration/projects_test.rb         | 12 ++++++++++++
 2 files changed, 17 insertions(+)

       via  b82d80addf80b9ead7c63f85f72613042b3b2c51 (commit)
      from  7962de491af28d00a9c88412ad4d1e42be83432a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b82d80addf80b9ead7c63f85f72613042b3b2c51
Author: Brett Smith <brett at curoverse.com>
Date:   Wed Aug 6 18:16:10 2014 -0400

    3388: Workbench only lists user groups when sharing a project with groups.
    
    This ensures that projects aren't included in the listing, which is
    not useful and confusing.  Closes #3388.

diff --git a/apps/workbench/app/views/projects/_show_sharing.html.erb b/apps/workbench/app/views/projects/_show_sharing.html.erb
index a5482ef..89a7950 100644
--- a/apps/workbench/app/views/projects/_show_sharing.html.erb
+++ b/apps/workbench/app/views/projects/_show_sharing.html.erb
@@ -13,6 +13,10 @@
      perms_json << {value: link_name, text: link_desc}
    end
    perms_json = perms_json.to_json
+   choose_filters = {
+     "groups" => [["group_class", "=", nil]],
+   }
+   choose_filters.default = []
    owner_icon = fa_icon_class_for_uuid(@object.owner_uuid)
    if owner_icon == "fa-users"
      owner_icon = "fa-folder"
@@ -30,6 +34,7 @@
       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',
diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index adac0bf..d8b4cb1 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -151,4 +151,16 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     add_share_and_check("groups", new_name)
     modify_share_and_check(new_name)
   end
+
+  test "'share with group' listing does not offer projects" do
+    show_project_using("active")
+    click_on "Sharing"
+    click_on "Share with groups"
+    good_uuid = api_fixture("groups")["private"]["uuid"]
+    assert(page.has_selector?(".selectable[data-object-uuid=\"#{good_uuid}\"]"),
+           "'share with groups' listing missing owned user group")
+    bad_uuid = api_fixture("groups")["asubproject"]["uuid"]
+    assert(page.has_no_selector?(".selectable[data-object-uuid=\"#{bad_uuid}\"]"),
+           "'share with groups' listing includes project")
+  end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list