[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-87-g6b77b01
Thomas Sibley
trs at bestpractical.com
Tue Jun 15 16:44:09 EDT 2010
The branch, 3.8-trunk has been updated
via 6b77b01478329bbcde19da30c3d68f605a79cbd6 (commit)
from 560496d09896031f81b8adfed503cae1a8e46254 (commit)
Summary of changes:
lib/RT/Interface/Web.pm | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 6b77b01478329bbcde19da30c3d68f605a79cbd6
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Jun 15 16:44:50 2010 -0400
Add 2 callbacks to autohandler: Session and Final
Session lets extensions hook into the autohandler before any auth or
page display (including NoAuth) happens.
Final lets extensions get the last word in or cleanup after all
rendering before RT's done handling the request.
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index d6b854f..50f0650 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -192,6 +192,9 @@ sub HandleRequest {
SendSessionCookie();
$HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new() unless _UserLoggedIn();
+ # Process session-related callbacks before any auth attempts
+ $HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Session', CallbackPage => '/autohandler' );
+
MaybeShowNoAuthPage($ARGS);
AttemptExternalAuth($ARGS) if RT->Config->Get('WebExternalAuthContinuous') or not _UserLoggedIn();
@@ -223,6 +226,9 @@ sub HandleRequest {
ShowRequestedPage($ARGS);
LogRecordedSQLStatements();
+
+ # Process per-page final cleanup callbacks
+ $HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Final', CallbackPage => '/autohandler' );
}
sub _ForceLogout {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list