[ARVADOS] created: aa2245a2770dac18a1c26af33cae3e24b3e656ab
git at public.curoverse.com
git at public.curoverse.com
Fri Oct 17 20:09:38 EDT 2014
at aa2245a2770dac18a1c26af33cae3e24b3e656ab (commit)
commit aa2245a2770dac18a1c26af33cae3e24b3e656ab
Merge: 554b4b8 269adb3
Author: radhika <radhika at curoverse.com>
Date: Fri Oct 17 20:09:29 2014 -0400
Merge branch 'master' into 4054-sharing-email
commit 554b4b8821b2eed4c1ce5064e20d043465b571ba
Author: radhika <radhika at curoverse.com>
Date: Fri Oct 17 18:40:28 2014 -0400
4054: show email address in sharing tab and update test to verify.
diff --git a/apps/workbench/app/views/projects/_show_sharing.html.erb b/apps/workbench/app/views/projects/_show_sharing.html.erb
index cafaf6d..95a7ee1 100644
--- a/apps/workbench/app/views/projects/_show_sharing.html.erb
+++ b/apps/workbench/app/views/projects/_show_sharing.html.erb
@@ -61,6 +61,7 @@
<table id="project_sharing" class="topalign table" style="clear: both; margin-top: 1em;">
<tr>
<th>User/Group Name</th>
+ <th>Email Address</th>
<th colspan="2">Project Access</th>
</tr>
@@ -72,12 +73,19 @@
link_name = shared_with.full_name
else
link_name = shared_with.name
- end %>
+ end
+ if shared_with && shared_with.respond_to?(:email)
+ email = shared_with.email
+ end
+ %>
<tr data-object-uuid="<%= link.uuid %>">
<td>
<i class="fa fa-fw <%= fa_icon_class_for_uuid(link.tail_uuid) %>"></i>
<%= link_to_if_arvados_object(link.tail_uuid, link_text: link_name) %>
</td>
+ <td>
+ <%= email %>
+ </td>
<td><%= link_to perm_name_desc_map[link.name], '#', {
"data-emptytext" => "Read",
"data-placement" => "bottom",
diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb
index 83565f9..e86f45a 100644
--- a/apps/workbench/test/integration/projects_test.rb
+++ b/apps/workbench/test/integration/projects_test.rb
@@ -182,7 +182,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
find('#project_sharing').all('tr')
end
- def add_share_and_check(share_type, name)
+ def add_share_and_check(share_type, name, obj=nil)
assert(page.has_no_text?(name), "project is already shared with #{name}")
start_share_count = share_rows.size
click_on("Share with #{share_type}")
@@ -194,6 +194,9 @@ class ProjectsTest < ActionDispatch::IntegrationTest
find(".selectable", text: name).click
assert(has_no_selector?(".modal-dialog-preview-pane"),
"preview pane available in sharing dialog")
+ if share_type == 'users'
+ assert(page.has_text?(obj['email']), "Did not find user's email")
+ end
assert_raises(Capybara::ElementNotFound,
"Projects pulldown available from sharing dialog") do
click_on "All projects"
@@ -240,7 +243,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest
show_project_using("active")
click_on "Sharing"
- add_share_and_check("users", new_name)
+ add_share_and_check("users", new_name, add_user)
modify_share_and_check(new_name)
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list