Skip to content

Commit

Permalink
Always pass import flag within LDAP import
Browse files Browse the repository at this point in the history
When constructing a user object in the LDAP import, the import flag was
not passed through as it is elsewhere in the import process. If this
flag is needed in the LDAP field mapping, there was no guaranteed
availability.

Explicitly passing the import argument to _build_user_object ensures
that LDAP mappings will always be aware of whether this is a live or
test import.
  • Loading branch information
Jason Crome committed May 9, 2024
1 parent d095c61 commit bf79061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/RT/LDAPImport.pm
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ sub _import_users {

my $done = 0; my $count = scalar @$users;
while (my $entry = shift @$users) {
my $user = $self->_build_user_object( ldap_entry => $entry );
my $user = $self->_build_user_object( ldap_entry => $entry, import => $args{import} );
$self->_import_user( user => $user, ldap_entry => $entry, import => $args{import} );
$done++;
$RT::Logger->debug("Imported $done/$count users");
Expand Down

0 comments on commit bf79061

Please sign in to comment.