[Bps-public-commit] r16630 - RT-Authen-ExternalAuth/branches/errorchecking/lib/RT

falcone at bestpractical.com falcone at bestpractical.com
Thu Oct 30 17:16:41 EDT 2008


Author: falcone
Date: Thu Oct 30 17:16:28 2008
New Revision: 16630

Modified:
   RT-Authen-ExternalAuth/branches/errorchecking/lib/RT/User_Vendor.pm

Log:
* this lets someone not do any configuration and it falls 
  back to the database with just a warning

Modified: RT-Authen-ExternalAuth/branches/errorchecking/lib/RT/User_Vendor.pm
==============================================================================
--- RT-Authen-ExternalAuth/branches/errorchecking/lib/RT/User_Vendor.pm	(original)
+++ RT-Authen-ExternalAuth/branches/errorchecking/lib/RT/User_Vendor.pm	Thu Oct 30 17:16:28 2008
@@ -53,7 +53,12 @@
                         "Trying External authentication");
     
     # Get the prioritised list of external authentication services
-    my @auth_services = @$RT::ExternalAuthPriority;
+    my @auth_services = @{$RT::ExternalAuthPriority||[]};
+
+    unless (@auth_services) {
+        $RT::Logger->error("You must define ExternalAuthPriority in your RT Config");
+        return;
+    }
     
     # For each of those services..
     foreach my $service (@auth_services) {



More information about the Bps-public-commit mailing list