[ARVADOS] created: f6f6ed672a240c9b91e78591b4f67a5ed4250758
git at public.curoverse.com
git at public.curoverse.com
Wed Apr 22 21:23:31 EDT 2015
at f6f6ed672a240c9b91e78591b4f67a5ed4250758 (commit)
commit f6f6ed672a240c9b91e78591b4f67a5ed4250758
Author: Radhika Chippada <radhika at curoverse.com>
Date: Wed Apr 22 21:21:29 2015 -0400
5780: Display message in chooser popup if one is provided. Use this to show a message in sharing popup
explaining to user that only those users or groups that the user is allowed to access are displayed.
diff --git a/apps/workbench/app/views/application/_choose.html.erb b/apps/workbench/app/views/application/_choose.html.erb
index 3233d8d..b1e63da 100644
--- a/apps/workbench/app/views/application/_choose.html.erb
+++ b/apps/workbench/app/views/application/_choose.html.erb
@@ -7,6 +7,10 @@
</div>
<div class="modal-body">
+ <% if params[:message].present? %>
+ <p> <%= params[:message] %> </p>
+ <% end %>
+
<% project_filters, chooser_filters = (params[:filters] || []).partition do |attr, op, val|
attr == "owner_uuid" and op == "="
end %>
diff --git a/apps/workbench/app/views/application/_show_sharing.html.erb b/apps/workbench/app/views/application/_show_sharing.html.erb
index 21d6521..f22ba87 100644
--- a/apps/workbench/app/views/application/_show_sharing.html.erb
+++ b/apps/workbench/app/views/application/_show_sharing.html.erb
@@ -48,6 +48,7 @@
<%= link_to(send("choose_#{share_class}_path",
title: "Share with #{share_class}",
+ message: "Only #{share_class} you are allowed to access are shown. Please contact your administrator if you need to be added to a specific group.",
by_project: false,
preview_pane: false,
multiple: true,
diff --git a/apps/workbench/test/helpers/share_object_helper.rb b/apps/workbench/test/helpers/share_object_helper.rb
index ba09acc..9d8f8d0 100644
--- a/apps/workbench/test/helpers/share_object_helper.rb
+++ b/apps/workbench/test/helpers/share_object_helper.rb
@@ -19,6 +19,7 @@ module ShareObjectHelper
# Otherwise, the not-included assertions might falsely pass because
# the modal hasn't loaded yet.
find(".selectable", text: name).click
+ assert_text "Only #{share_type} you are allowed to access are shown"
assert(has_no_selector?(".modal-dialog-preview-pane"),
"preview pane available in sharing dialog")
if share_type == 'users' and obj and obj['email']
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list