diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 1df8b13a5..db16c0b9c 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -1,6 +1,6 @@ module Admin class UsersController < ApplicationController - before_filter :admin_only + before_filter :moderator_only def edit @user = User.find(params[:id]) diff --git a/app/views/users/_secondary_links.html.erb b/app/views/users/_secondary_links.html.erb index 5030efc8d..01c0eedd7 100644 --- a/app/views/users/_secondary_links.html.erb +++ b/app/views/users/_secondary_links.html.erb @@ -2,9 +2,11 @@
  • <%= link_to "Listing", users_path %>
  • <%= link_to "Search", search_users_path %>
  • + <% if CurrentUser.is_anonymous? %>
  • <%= link_to "Sign up", new_user_path %>
  • <% end %> + <% if @user && !@user.new_record? && !CurrentUser.is_anonymous? %>
  • |
  • <% if @user.id == CurrentUser.id %> @@ -17,12 +19,15 @@ <% else %>
  • <%= link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %>
  • <% end %> + <% if !CurrentUser.is_privileged? %>
  • <%= link_to "Upgrade", upgrade_information_users_path %>
  • <% end %> - <% if CurrentUser.is_admin? %> + + <% if CurrentUser.is_moderator? %>
  • <%= link_to "Promote", edit_admin_user_path(@user) %>
  • <% end %> +
  • |
  • <%= link_to "Sign out", sign_out_session_path %>
  • <% end %>