]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/diary_entries/_diary_comment.html.erb
Merge remote-tracking branch 'upstream/pull/2226'
[rails.git] / app / views / diary_entries / _diary_comment.html.erb
index 301739eef9cf3ffe19d4b5fd0d0868198772c840..639ac9a191f170e055db979142739c8f179dbb07 100644 (file)
@@ -7,7 +7,7 @@
   </p>
 
   <div class="richtext"><%= diary_comment.body.to_html %></div>
-  <% if current_user && current_user.administrator? %>
+  <% if can? :hidecomment, DiaryEntry %>
     <span>
       <% if diary_comment.visible? %>
         <%= link_to t(".hide_link"), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t(".confirm") } %>