[ARVADOS] updated: 58f8ab40470a8c1db31563e26c66fee9dbdd7477

git at public.curoverse.com git at public.curoverse.com
Mon Feb 16 18:30:52 EST 2015


Summary of changes:
 apps/workbench/app/views/collections/show.html.erb | 23 ++++++++++++++++++----
 .../test/integration/anonymous_access_test.rb      |  1 +
 2 files changed, 20 insertions(+), 4 deletions(-)

       via  58f8ab40470a8c1db31563e26c66fee9dbdd7477 (commit)
      from  1ee6ce5be0c86c1d2e903252ba2a70694be5cf31 (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 58f8ab40470a8c1db31563e26c66fee9dbdd7477
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon Feb 16 18:30:03 2015 -0500

    5220: do not show "Sharing and permissions" box when an anonymous user is viewing a shared collection.

diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb
index c3e0b7c..2c560ef 100644
--- a/apps/workbench/app/views/collections/show.html.erb
+++ b/apps/workbench/app/views/collections/show.html.erb
@@ -60,12 +60,13 @@
       </div>
     </div>
   </div>
+  <% if current_user %>
   <div class="col-md-3">
     <div class="panel panel-default">
       <div class="panel-heading">
-	<h3 class="panel-title">
-	  Sharing and permissions
-	</h3>
+      	<h3 class="panel-title">
+	        Sharing and permissions
+	      </h3>
       </div>
       <div class="panel-body">
         <!--
@@ -76,7 +77,7 @@
           <%= render partial: 'sharing_button' %>
         </div>
 
-	<div style="height:0.5em;"></div>
+	    <div style="height:0.5em;"></div>
         <% if @projects.andand.any? %>
           <p>Included in projects:<br />
           <%= render_arvados_object_list_start(@projects, 'Show all projects',
@@ -99,6 +100,20 @@
       </div>
     </div>
   </div>
+  <% else %>
+  <div class="col-md-3">
+    <div class="panel panel-default">
+      <div class="panel-heading">
+      	<h3 class="panel-title">
+	        Welcome to Arvados
+	      </h3>
+      </div>
+      <div class="panel-body">
+        You are accessing public data.
+      </div>
+    </div>
+  </div>
+  <% end %>
 </div>
 
 <%= render file: 'application/show.html.erb', locals: local_assigns %>
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 2e04dca..6508879 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -87,6 +87,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
 
     # in collection page
     assert_no_selector 'input', text: 'Create sharing link'
+    assert_no_text 'Sharing and permissions'
     assert_no_selector 'a', text: 'Upload'
     assert_no_selector 'button', 'Selection'
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list