[Rt-commit] rt branch 5.0/require-ldapimport-after-init created. rt-5.0.3-125-g48ca6281bb

BPS Git Server git at git.bestpractical.com
Wed Sep 28 17:26:39 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/require-ldapimport-after-init has been created
        at  48ca6281bb8f64e828a6a66ccb853fcbb124b3f6 (commit)

- Log -----------------------------------------------------------------
commit 48ca6281bb8f64e828a6a66ccb853fcbb124b3f6
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Wed Sep 28 11:51:16 2022 -0500

    Require LDAPImport after init
    
    The lib path boilerplate during the BEGIN block of rt-ldapimport
    loads lib and local/lib, but not lib from within plugins, which
    happens during RT init.
    
    This commit updates rt-ldapimport to require RT::LDAPImport after
    RT is initialized to allow loading overlays for LDAPImport.pm from
    within plugins.

diff --git a/sbin/rt-ldapimport.in b/sbin/rt-ldapimport.in
index fb6cd41430..53149b9150 100644
--- a/sbin/rt-ldapimport.in
+++ b/sbin/rt-ldapimport.in
@@ -66,14 +66,6 @@ BEGIN { # BEGIN RT CMD BOILERPLATE
 
 }
 
-
-eval { require RT::LDAPImport; 1; } or do {
-    print "Unable to run rt-ldapimport without dependencies.\n";
-    print "Rerun configure with the --enable-externalauth option.";
-    exit 0;
-};
-
-
 my %OPT = (
     users  => 1,
     groups => 1,
@@ -85,6 +77,12 @@ Init(
     'import',
     'users!', 'groups!');
 
+eval { require RT::LDAPImport; 1; } or do {
+    print "Unable to run rt-ldapimport without dependencies.\n";
+    print "Rerun configure with the --enable-externalauth option.\n";
+    exit 0;
+};
+
 my $importer = RT::LDAPImport->new;
 
 if ($OPT{import}) {

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list