[ARVADOS] updated: 2ad69e1ae15237217bf3561a14f57b66c1c5c781
git at public.curoverse.com
git at public.curoverse.com
Mon Apr 6 15:30:36 EDT 2015
Summary of changes:
apps/workbench/app/views/layouts/body.html.erb | 17 +++++++++++++++++
.../workbench/test/integration/anonymous_access_test.rb | 13 +++++++++++++
2 files changed, 30 insertions(+)
via 2ad69e1ae15237217bf3561a14f57b66c1c5c781 (commit)
from 7bd9cd28b4c655dc2774614e65241a33fc4ca839 (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 2ad69e1ae15237217bf3561a14f57b66c1c5c781
Author: Radhika Chippada <radhika at curoverse.com>
Date: Mon Apr 6 15:29:07 2015 -0400
5565: show trimmed down version of breadcrumbs in anonymous view.
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index fbbd0fa..5bea492 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -188,6 +188,23 @@
<% end %>
</ul>
</nav>
+ <% elsif !current_user %> <%# anonymous %>
+ <% if (@name_link or @object) and (project_breadcrumbs.any?) %>
+ <nav class="navbar navbar-default breadcrumbs" role="navigation">
+ <ul class="nav navbar-nav navbar-left">
+ <li>
+ Public Projects
+ </li>
+ <% p = project_breadcrumbs.last %>
+ <li class="nav-separator">
+ <i class="fa fa-lg fa-angle-double-right"></i>
+ </li>
+ <li>
+ <%= link_to(p.name, project_path(p.uuid), data: {object_uuid: p.uuid, name: 'name'}) %>
+ </li>
+ </ul>
+ </nav>
+ <% end %>
<% end %>
<%= render partial: 'browser_unsupported' %><%# requires JS support below %>
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 0fb21b2..4447bd3 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -140,6 +140,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
within first('tr', text: look_for) do
click_link 'Show'
end
+ assert_text 'Public Projects Unrestricted public data'
assert_text 'script_version'
assert_text 'zzzzz-tpzed-xurymjxw79nv3jz' # modified by user
@@ -156,6 +157,7 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
end
# in pipeline instance page
+ assert_text 'Public Projects Unrestricted public data'
assert_text 'This pipeline is complete'
assert_no_selector 'a', text: 'Re-run with latest'
assert_no_selector 'a', text: 'Re-run options'
@@ -176,7 +178,18 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
end
# in template page
+ assert_text 'Public Projects Unrestricted public data'
assert_text 'script version'
assert_no_selector 'a', text: 'Run this pipeline'
end
+
+ test "anonymous user accesses collection in shared project" do
+ visit "/collections/#{api_fixture('collections')['public_text_file']['uuid']}"
+
+ # in collection page
+ assert_text 'Public Projects Unrestricted public data'
+ assert_text 'Hello world'
+ assert_text 'Content address'
+ assert_selector 'a', text: 'Provenance graph'
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list