[ARVADOS] updated: 82e19bdf2dd82dec7fa40c4b14a2002bd9132ad4

git at public.curoverse.com git at public.curoverse.com
Thu Dec 11 12:29:56 EST 2014


Summary of changes:
 apps/workbench/app/views/projects/_show_tab_contents.html.erb | 2 +-
 apps/workbench/test/integration/projects_test.rb              | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

       via  82e19bdf2dd82dec7fa40c4b14a2002bd9132ad4 (commit)
      from  366ba84cfb41905bf5aca2d296d4384b9fccb380 (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 82e19bdf2dd82dec7fa40c4b14a2002bd9132ad4
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Thu Dec 11 12:26:30 2014 -0500

    4799: do not offer "move selected" option when current user cannot write to the project.

diff --git a/apps/workbench/app/views/projects/_show_tab_contents.html.erb b/apps/workbench/app/views/projects/_show_tab_contents.html.erb
index 66c469e..fe9595a 100644
--- a/apps/workbench/app/views/projects/_show_tab_contents.html.erb
+++ b/apps/workbench/app/views/projects/_show_tab_contents.html.erb
@@ -36,6 +36,7 @@
                   'data-selection-param-name' => 'selection[]',
                   'data-selection-action' => 'copy'
             %></li>
+          <% if @object.editable? %>
           <li><%= link_to "Move selected...", '#',
                   'data-href' => choose_projects_path(
                     title: 'Move selected items to...',
@@ -52,7 +53,6 @@
                   'data-selection-param-name' => 'selection[]',
                   'data-selection-action' => 'move'
             %></li>
-          <% if @object.editable? %>
           <li><%= link_to "Remove selected", '#',
                   method: :delete,
                   'data-href' => url_for(action: :remove_items),
diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index b377786..0ed2624 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -502,8 +502,8 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     end
   end
 
-  # "Remove selected" selection option should not be available when current user cannot write to the project
-  test "remove selected action is not available when current user cannot write to project" do
+  # "Move selected" and "Remove selected" options should not be available when current user cannot write to the project
+  test "move selected and remove selected actions not available when current user cannot write to project" do
     my_project = api_fixture('groups')['anonymously_accessible_project']
     visit page_with_token 'active', "/projects/#{my_project['uuid']}"
 
@@ -512,7 +512,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
       assert_selector 'li', text: 'Create new collection with selected collections'
       assert_selector 'li', text: 'Compare selected'
       assert_selector 'li', text: 'Copy selected'
-      assert_selector 'li', text: 'Move selected'
+      assert_no_selector 'li', text: 'Move selected'
       assert_no_selector 'li', text: 'Remove selected'
     end
   end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list