[Bps-public-commit] r16732 - in RT-Authen-ExternalAuth/trunk: html/Callbacks/ExternalAuth/autohandler
falcone at bestpractical.com
falcone at bestpractical.com
Thu Nov 6 15:41:00 EST 2008
Author: falcone
Date: Thu Nov 6 15:41:00 2008
New Revision: 16732
Modified:
RT-Authen-ExternalAuth/trunk/ (props changed)
RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth
Log:
r41408 at ketch: falcone | 2008-11-06 15:40:56 -0500
* only load once
* force User_Overlay to reload also
Modified: RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth
==============================================================================
--- RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth (original)
+++ RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth Thu Nov 6 15:41:00 2008
@@ -1,16 +1,20 @@
+<%once>
+my $loaded_user = 0;
+</%once>
<%init>
use RT::Authen::ExternalAuth;
-# If the RT::User::UpdateFromExternal method is not available, then we are in
-# RT-3.8.0 or RT-3.8.1 and we need to work around a bug in the plugin system:
+# Work around a bug in the RT 3.8.0 and 3.8.1 plugin system (fixed in 3.8.2)
# Temporarily force RT to reload RT::User, since it isn't being loaded
# correctly as a plugin.
-#unless (RT::User->can('UpdateFromExternal')) {
+unless ($loaded_user) {
$RT::Logger->error("Working around bug in RT and reloading RT::User");
+ $loaded_user++;
delete $INC{'RT/User.pm'};
+ delete $INC{'RT/User_Overlay.pm'};
require RT::User;
-#}
+}
######################################################################################
# If the user is logging in, let's authenticate; if they can auth but don't load
More information about the Bps-public-commit
mailing list