]> Frank Brehm's Git Trees - pixelpark/ldap-migration.git/commitdiff
Including ACI in migration
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 4 Mar 2021 11:35:51 +0000 (12:35 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 4 Mar 2021 11:35:51 +0000 (12:35 +0100)
lib/ldap_migration/__init__.py

index 3b66dcc9a63ecf3f9087833be41a4bd2b0d729e3..ad7005597cbe297e86233b4e20c1b88d8d2dc371 100644 (file)
@@ -708,7 +708,7 @@ class LDAPMigrationApplication(BaseApplication):
             self.src_server = None
 
     # -------------------------------------------------------------------------
-    def get_source_item(self, src_dn, tgt_dn, with_acl=False):
+    def get_source_item(self, src_dn, tgt_dn, with_acl=True):
         """Reading a single LDAP item."""
 
         src_entry = None
@@ -870,7 +870,7 @@ class LDAPMigrationApplication(BaseApplication):
 
 
     # -------------------------------------------------------------------------
-    def get_target_item(self, tgt_dn, with_acl=False):
+    def get_target_item(self, tgt_dn, with_acl=True):
 
         tgt_entry = None
 
@@ -1389,7 +1389,7 @@ class LDAPMigrationApplication(BaseApplication):
         try:
             self._migrate_entries(
                 self.struct_dns, fh=fh, force=False, is_root=True,
-                with_group_entries=True, with_acl=False)
+                with_group_entries=True, with_acl=True)
         except CommonLDAPMigrationError as e:
             msg = "Abort migration by {c}: {e}".format(c=e.__class__.__name__, e=e)
             LOG.error(msg)
@@ -1425,7 +1425,7 @@ class LDAPMigrationApplication(BaseApplication):
         for src_dn in self.all_entries:
             try:
                 if self.migrate_entry(
-                        src_dn, fh=fh, force=False, with_acl=False, migrate_if_group=False):
+                        src_dn, fh=fh, force=False, with_acl=True, migrate_if_group=False):
                     if wait:
                         time.sleep(wait)
             except FatalLDAPMigrationError as e:
@@ -1648,7 +1648,7 @@ class LDAPMigrationApplication(BaseApplication):
     # -------------------------------------------------------------------------
     def _migrate_entries(
             self, cur_hash, fh, force=False, is_root=False,
-            with_group_entries=True, with_acl=False):
+            with_group_entries=True, with_acl=True):
 
         wait = self.config.wait_after_write
         point = '<root>'
@@ -1685,7 +1685,7 @@ class LDAPMigrationApplication(BaseApplication):
 
     # -------------------------------------------------------------------------
     def migrate_entry(
-            self, src_dn, fh, force=False, with_acl=False,
+            self, src_dn, fh, force=False, with_acl=True,
             migrate_if_group=True):
 
         tgt_dn = self.mangle_dn(src_dn)