Module: Clearance::UsersController::PrivateInstanceMethods

Defined in:
lib/clearance/app/controllers/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#ensure_user_is_accessing_selfObject



66
67
68
69
# File 'lib/clearance/app/controllers/users_controller.rb', line 66

def ensure_user_is_accessing_self
  return if current_user and current_user.respond_to?(:admin?) and current_user.admin?
  deny_access('You cannot edit that user.', :redirect => root_url) unless current_user.id.to_i == params[:id].to_i
end