[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.0-133-ga02bfc3

Shawn Moore shawn at bestpractical.com
Fri May 13 17:44:26 EDT 2016


The branch, 4.4-trunk has been updated
       via  a02bfc3c465e3c26063f3da391a31db10d07f6ee (commit)
      from  648581f6a5fe44a01fc7551970449cd222640486 (commit)

Summary of changes:
 lib/RT/Config.pm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit a02bfc3c465e3c26063f3da391a31db10d07f6ee
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Fri May 13 21:38:33 2016 +0000

    Enable ExternalAuth only if the related settings have values
    
        PostLoadCheck is called even if the setting isn't explicitly
        set, causing us to unconditionally load ExternalAuth.

diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 99eeeab..e885643 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -1025,7 +1025,8 @@ our %META;
         PostLoadCheck => sub {
             my $self = shift;
             my $settings = shift || {};
-            $self->EnableExternalAuth();
+
+            $self->EnableExternalAuth() if keys %$settings > 0;
 
             my $remove = sub {
                 my ($service) = @_;
@@ -1075,7 +1076,8 @@ our %META;
         PostLoadCheck => sub {
             my $self = shift;
             my @values = @{ shift || [] };
-            $self->EnableExternalAuth();
+
+            $self->EnableExternalAuth() if @values;
 
             if (not @values) {
                 $RT::Logger->debug("ExternalAuthPriority not defined. Attempting to create based on ExternalSettings");
@@ -1102,7 +1104,8 @@ our %META;
         PostLoadCheck => sub {
             my $self = shift;
             my @values = @{ shift || [] };
-            $self->EnableExternalAuth();
+
+            $self->EnableExternalAuth() if @values;
 
             if (not @values) {
                 $RT::Logger->debug("ExternalInfoPriority not defined. User information (including user enabled/disabled) cannot be externally-sourced");

-----------------------------------------------------------------------


More information about the rt-commit mailing list