[Bps-public-commit] rt-extension-ldapimport-multiemail branch, master, updated. 0.02-1-gf180b55

Alex Vandiver alexmv at bestpractical.com
Thu Apr 3 10:51:47 EDT 2014


The branch, master has been updated
       via  f180b55351b771c717b271202a960d9876c9c04b (commit)
      from  aad6c1c7996acecb7b51bac5ab05949ce3603bae (commit)

Summary of changes:
 lib/RT/Extension/LDAPImport/MultiEmail.pm | 2 ++
 1 file changed, 2 insertions(+)

- Log -----------------------------------------------------------------
commit f180b55351b771c717b271202a960d9876c9c04b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Jan 27 16:39:04 2014 -0500

    Only unmerge users made by the LDAP import (the system user)
    
    This allows users to hand-merge additional addresses

diff --git a/lib/RT/Extension/LDAPImport/MultiEmail.pm b/lib/RT/Extension/LDAPImport/MultiEmail.pm
index 7391dff..da38936 100644
--- a/lib/RT/Extension/LDAPImport/MultiEmail.pm
+++ b/lib/RT/Extension/LDAPImport/MultiEmail.pm
@@ -90,6 +90,8 @@ sub _import_user {
     for my $id (grep {not $merged{$_}} @{$user->GetMergedUsers->Content}) {
         my $alt = RT::User->new( RT->SystemUser );
         $alt->LoadOriginal( id => $id );
+        my ($effective_id) = $alt->Attributes->Named("EffectiveId");
+        next unless $effective_id->Creator == RT->SystemUser->id;
         $alt->UnMerge;
     }
 

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



More information about the Bps-public-commit mailing list