From 76b9eebf07b424ec2a8fde9b7760b8ce499063bc Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Thu, 1 May 2014 11:50:51 -0400 Subject: [PATCH] Add "Shared with" section to Sharing/Permissions panel. --- apps/workbench/app/controllers/folders_controller.rb | 2 ++ apps/workbench/app/views/folders/show.html.erb | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/apps/workbench/app/controllers/folders_controller.rb b/apps/workbench/app/controllers/folders_controller.rb index 566b1a9da3..43b6f407b8 100644 --- a/apps/workbench/app/controllers/folders_controller.rb +++ b/apps/workbench/app/controllers/folders_controller.rb @@ -39,6 +39,8 @@ class FoldersController < ApplicationController def show @objects = @object.contents include_linked: true + @share_links = Link.filter([['head_uuid', '=', @object.uuid], + ['link_class', '=', 'permission']]) @logs = Log.limit(10).filter([['object_uuid', '=', @object.uuid]]) super end diff --git a/apps/workbench/app/views/folders/show.html.erb b/apps/workbench/app/views/folders/show.html.erb index bacf6693cb..505a8c27b7 100644 --- a/apps/workbench/app/views/folders/show.html.erb +++ b/apps/workbench/app/views/folders/show.html.erb @@ -65,6 +65,13 @@ -->

Owner: <%= link_to_if_arvados_object @object.owner_uuid, friendly_name: true %>

+ <% if @share_links.any? %> +

Shared with: + <% @share_links.andand.each do |link| %> +
<%= link_to_if_arvados_object link.tail_uuid, friendly_name: true %> + <% end %> +

+ <% end %> -- 2.30.2