[ARVADOS] created: aa50f466c7515de653141964d13f3e204d46bb29
git at public.curoverse.com
git at public.curoverse.com
Sun Mar 8 12:29:41 EDT 2015
at aa50f466c7515de653141964d13f3e204d46bb29 (commit)
commit aa50f466c7515de653141964d13f3e204d46bb29
Author: Radhika Chippada <radhika at curoverse.com>
Date: Sun Mar 8 12:25:22 2015 -0400
5374: in collection show page, hide checkboxes for anonymous user view.
diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 383ec64..02ac2ee 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -83,7 +83,7 @@ function unselect_all_files() {
</div>
<div class="collection_files_name">
- <% if !defined? no_checkboxes or !no_checkboxes %>
+ <% if (!defined? no_checkboxes or !no_checkboxes) and current_user %>
<%= check_box_tag 'uuids[]', "#{@object.uuid}/#{file_path}", false, {
:class => "persistent-selection",
:friendly_type => "File",
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 6508879..0aab5a4 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -92,6 +92,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
assert_no_selector 'button', 'Selection'
within '#collection_files tr,li', text: 'GNU_General_Public_License,_version_3.pdf' do
+ assert page.has_no_selector?('[value*="GNU_General_Public_License"]')
find 'a[title~=View]'
find 'a[title~=Download]'
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list