</li>
<% end %>
- <% if current_user and current_user.moderator? and current_user.blocks_created.exists? %>
+ <% if can?(:create, UserBlock) and current_user.blocks_created.exists? %>
<li>
<%= link_to t(".blocks by me"), :controller => "user_blocks", :action => "blocks_by", :display_name => current_user.display_name %>
<span class='count-number'><%= number_with_delimiter(current_user.blocks_created.active.size) %></span>
</li>
<% end %>
- <% if current_user and current_user.moderator? %>
+ <% if can?(:create, UserBlock) %>
<li>
<%= link_to t(".create_block"), :controller => "user_blocks", :action => "new", :display_name => @user.display_name %>
</li>