[Bps-public-commit] r17840 - RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler
zordrak at bestpractical.com
zordrak at bestpractical.com
Tue Jan 20 15:18:15 EST 2009
Author: zordrak
Date: Tue Jan 20 15:18:14 2009
New Revision: 17840
Modified:
RT-Authen-ExternalAuth/trunk/html/Callbacks/ExternalAuth/autohandler/Auth
Log:
RT::Authen::ExternalAuth v0.08_01-alpha6 - Fix for RT-3.8.[0,1] plugin bug re-admitted
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 Tue Jan 20 15:18:14 2009
@@ -1,6 +1,25 @@
+<%once>
+my $loaded_user = 0;
+</%once>
<%init>
+
use RT::Authen::ExternalAuth;
+###################################################################################
+# 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 ($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'};
+ delete $INC{'RT/User_Vendor.pm'};
+ require RT::User;
+}
+###################################################################################
+
my ($val,$msg);
unless($session{'CurrentUser'} && $session{'CurrentUser'}->Id) {
($val,$msg) = RT::Authen::ExternalAuth::DoAuth(\%session,$user,$pass);
More information about the Bps-public-commit
mailing list