get the logic right :X

This commit is contained in:
http://jneen.net/ 2017-03-09 12:02:56 -08:00
parent ef4ba8d3ce
commit 66f204e0f0

View file

@ -29,7 +29,7 @@ class Admin::UsersController < Admin::ApplicationController
end
def impersonate
if !can?(user, :log_in)
if can?(user, :log_in)
session[:impersonator_id] = current_user.id
warden.set_user(user, scope: :user)