]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user_blocks/_block.html.erb
Show edit buttons on active blocks to all moderators
[rails.git] / app / views / user_blocks / _block.html.erb
index 68850c28dfb22bd50d9c04ed3bc9fd84d058c288..b464b4ccdb3f6ef2d8c609ebe800650bdf6c346a 100644 (file)
@@ -15,8 +15,7 @@
     <% end %>
   </td>
   <td><%= link_to t(".show"), block %></td>
-  <td><% if current_user && (current_user.id == block.creator_id ||
-                             current_user.id == block.revoker_id) %><%= link_to t(".edit"), edit_user_block_path(block) %><% end %></td>
+  <td><% if can?(:edit, block) %><%= link_to t(".edit"), edit_user_block_path(block) %><% end %></td>
   <% if can?(:revoke, UserBlock) %>
   <td><% if block.active? %><%= link_to t(".revoke"), revoke_user_block_path(block) %><% end %></td>
   <% end %>