]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user_blocks/show.html.erb
Convert various moderator? tests to use cancancan permissions checks
[rails.git] / app / views / user_blocks / show.html.erb
index 7b34d204a96c3edbb5a0ab2b55944be7d647aaa6..7e225bf14e34b2cec45d43c221469a55d2d55af2 100644 (file)
@@ -13,7 +13,7 @@
     <% if current_user and current_user.id == @user_block.creator_id %>
       <li><%= link_to t(".edit"), edit_user_block_path(@user_block) %></li>
     <% end %>
-    <% if current_user and current_user.moderator? %>
+    <% if can?(:revoke, UserBlock) %>
       <li><%= link_to(t(".revoke"), :controller => "user_blocks", :action => "revoke", :id => @user_block.id) %></li>
     <% end %>
   <% end %>