From ec754d221368fad2b765fa60c665a461b2b29c78 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 2 Dec 2015 13:21:07 -0500 Subject: [PATCH] Be more explicit with the impersonate return URL --- app/controllers/admin/impersonation_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/impersonation_controller.rb b/app/controllers/admin/impersonation_controller.rb index 102dd437402..bf98af78615 100644 --- a/app/controllers/admin/impersonation_controller.rb +++ b/app/controllers/admin/impersonation_controller.rb @@ -11,7 +11,7 @@ class Admin::ImpersonationController < Admin::ApplicationController redirect_to admin_user_path(@user) else session[:impersonator_id] = current_user.username - session[:impersonator_return_to] = request.env['HTTP_REFERER'] + session[:impersonator_return_to] = admin_user_path(@user) warden.set_user(user, scope: 'user')