From 66f204e0f0dd74df3409547bea2cec98c8947f2c Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Thu, 9 Mar 2017 12:02:56 -0800 Subject: [PATCH] get the logic right :X --- app/controllers/admin/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 205cf0490ab..24504685e48 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -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)