Commit 5ba51906 authored by Thomas Sibley's avatar Thomas Sibley
Browse files

Actually disable RT::Authen::ExternalAuth while importing users from LDAP

The original code from 56d0d416 only stands a chance at working on RT
3.6.  RT 3.8 and 4.0 use the modern config handling and call
RT->Config->Get('Plugins') to load plugins.  Get() doesn't read values
from the RT:: namespace; it uses a secondary store which we never
affected.  By calling Set() ourselves we ensure the config is properly
updated and seen by the subsequent RT::Init() call.
parent 90716a17
......@@ -12,10 +12,15 @@ use lib '/opt/rt3/local/lib /opt/rt3/lib';
use RT;
RT::LoadConfig;
# Avoid extra user canonicalization calls by disabling RT::Authen::ExternalAuth
# while we import users from LDAP
@RT::Plugins = grep { $_ ne 'RT::Authen::ExternalAuth' }
@RT::Plugins;
if (RT->can('Config')) {
# Avoid extra user canonicalization calls by disabling
# RT::Authen::ExternalAuth while we import users from LDAP
RT->Config->Set(
'Plugins',
grep { $_ ne 'RT::Authen::ExternalAuth' }
RT->Config->Get('Plugins')
);
}
RT::Init;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment