]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/diary_entries/_diary_entry.html.erb
Allow moderators to hide diary entries and comments
[rails.git] / app / views / diary_entries / _diary_entry.html.erb
index fc1cca66e43fe7cea4217437e7c33d66d64c73cb..0aff1b113ef3c8c2c4b959eae74d00ff2d953356 100644 (file)
@@ -37,7 +37,7 @@
       </li>
     <% end %>
 
-    <% if current_user && current_user.administrator? %>
+    <% if can? :hide, DiaryEntry %>
       <li>
         <%= link_to t(".hide_link"), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t(".confirm") } %>
       </li>