12125: Don't offer to untrash item if it isn't trash
[arvados.git] / apps / workbench / app / views / application / 404.html.erb
index c09e6349ea387fbbffb8d579aa92defce401045b..283f5d59fd78a228a662d10f6823a88e85af7bf7 100644 (file)
@@ -53,7 +53,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
     <% 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 %>