[Rt-commit] rt branch, 4.2/redirect-after-login-callback, created. rt-4.2.6-36-g6a923e7
Kevin Falcone
falcone at bestpractical.com
Wed Aug 13 21:11:27 EDT 2014
The branch, 4.2/redirect-after-login-callback has been created
at 6a923e7056156d3226847bfbd17ee02d816c63eb (commit)
- Log -----------------------------------------------------------------
commit 6a923e7056156d3226847bfbd17ee02d816c63eb
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Aug 13 20:43:51 2014 -0400
Allow the SuccessfulLogin callback to change where a user Redirects to
This allows an extension to overwrite a user's intended destination, or
more usefully, detect when someone is logging in at the top level and
redirect instead to a Dashboard (or in RTIR's case, to /RTIR/).
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index ff2593a..a40f497 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -823,7 +823,7 @@ sub AttemptPasswordAuthentication {
InstantiateNewSession();
$HTML::Mason::Commands::session{'CurrentUser'} = $user_obj;
- $m->callback( %$ARGS, CallbackName => 'SuccessfulLogin', CallbackPage => '/autohandler' );
+ $m->callback( %$ARGS, CallbackName => 'SuccessfulLogin', CallbackPage => '/autohandler', RedirectTo => \$next );
# Really the only time we don't want to redirect here is if we were
# passed user and pass as query params in the URL.
-----------------------------------------------------------------------
More information about the rt-commit
mailing list