[Rt-commit] rt branch, 4.0/externalauth-use-next, created. rt-4.0.0rc4-37-g5dfa184
Alex Vandiver
alexmv at bestpractical.com
Mon Feb 7 15:54:08 EST 2011
The branch, 4.0/externalauth-use-next has been created
at 5dfa1847869db1040b685293af14858e3804abd1 (commit)
- Log -----------------------------------------------------------------
commit 5dfa1847869db1040b685293af14858e3804abd1
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Feb 7 15:54:04 2011 -0500
Make ExternalAuth also respect the ?next=hash argument after logins
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index fc5bc56..15273c2 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -512,6 +512,7 @@ sub AttemptExternalAuth {
$user =~ s/^\Q$NodeName\E\\//i;
}
+ my $next = delete $HTML::Mason::Commands::session{'NextPage'}->{$ARGS->{'next'} || ''};
InstantiateNewSession() unless _UserLoggedIn;
$HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new();
$HTML::Mason::Commands::session{'CurrentUser'}->$load_method($user);
@@ -559,6 +560,7 @@ sub AttemptExternalAuth {
if ( _UserLoggedIn() ) {
$m->callback( %$ARGS, CallbackName => 'ExternalAuthSuccessfulLogin', CallbackPage => '/autohandler' );
+ Redirect($next) if $next;
} else {
delete $HTML::Mason::Commands::session{'CurrentUser'};
$user = $orig_user;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list