Ensure that it behaves in a reasonable way if user has access to an item via a
sideways permission link instead of the usual ownership hierarchy.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>
<% if untrash_object != object %>
You must untrash the owner project to access this <%= class_name_h %>.
<% end %>
- <% if untrash_object.editable? %>
+ <% if untrash_object.is_trashed and untrash_object.editable? %>
<% msg = "Untrash '#{untrash_name}'?" %>
<%= link_to({action: 'untrash_items', selection: [untrash_object.uuid], controller: :trash_items}, remote: true, method: :post,
title: "Untrash", style: 'cursor: pointer;') do %>