Skip to content

Commit

Permalink
Merge pull request #229 from collective/add_principals_to_existing_gr…
Browse files Browse the repository at this point in the history
…oups
  • Loading branch information
pbauer authored Nov 11, 2023
2 parents f92eeca + 79d1541 commit d3946d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-----------------
Expand Down
6 changes: 3 additions & 3 deletions src/collective/exportimport/import_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d3946d8

Please sign in to comment.