X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6db326aa1f084a062a3b658876bc01bf650f5702..816ee8ec92735b5c80b382857953ac4325096a71:/app/views/users/show.html.erb diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 87eb9b45f..7e8b45185 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -35,7 +35,7 @@ <% end %> - <% if current_user and current_user.moderator? and current_user.blocks_created.exists? %> + <% if can?(:create, UserBlock) and current_user.blocks_created.exists? %>
  • <%= link_to t(".blocks by me"), :controller => "user_blocks", :action => "blocks_by", :display_name => current_user.display_name %> <%= number_with_delimiter(current_user.blocks_created.active.size) %> @@ -96,7 +96,7 @@
  • <% end %> - <% if current_user and current_user.moderator? %> + <% if can?(:create, UserBlock) %>
  • <%= link_to t(".create_block"), :controller => "user_blocks", :action => "new", :display_name => @user.display_name %>
  • @@ -111,34 +111,38 @@ <% end %> - <% if current_user and current_user.administrator? %> + <% if can?(:set_status, User) || can?(:delete, User) %> <% end %> @@ -194,7 +198,7 @@ <%= content_tag "div", "", :id => "map", :class => "content_map", :data => { :user => user_data } %> <% end %> - <% friends = @user.friends.collect(&:befriendee) %> + <% friends = @user.friends %> <% nearby = @user.nearby - friends %>