diff --git a/CHANGES.rst b/CHANGES.rst index dde62f7e..b58c8136 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,8 @@ Changelog - Add support for ATTopic export_content [avoinea] +- Add principals to groups that already exist during import (#228) + [pbauer] 1.10 (2023-10-11) ----------------- diff --git a/src/collective/exportimport/import_other.py b/src/collective/exportimport/import_other.py index 043337a5..81182195 100644 --- a/src/collective/exportimport/import_other.py +++ b/src/collective/exportimport/import_other.py @@ -222,10 +222,10 @@ def import_groups(self, data): description=item["description"], roles=item["roles"], ) - # add all principals - for principal in item.get("principals", []): - pg.addPrincipalToGroup(principal, item["groupid"]) groupsNumber += 1 + # add all principals, even if they are not stored in plone (e.g. LDAP) + for principal in item.get("principals", []): + pg.addPrincipalToGroup(principal, item["groupid"]) return groupsNumber def import_members(self, data):