# add acls after all subfolders or their acls will be derived from parent folder
for acl_mailbox in storage.acl_mailboxes:
# find folder acls record and retrieve them
- try:
- mb_acls = storage.file_acls[acl_mailbox]
- except KeyError:
- # no rights for the mailbox were found and warn if acl file loaded
- if len(storage.file_acls) > 0:
- logging.warning("Could not find the acls for mailbox %s for user %s.", acl_mailbox, args.ouser)
- mb_acls = {}
+ mb_acls = storage.get_mailbox_acls(acl_mailbox)
session.add_acls(acl_mailbox, mb_acls, args.ouser, args.user)
storage.created_mailboxes = []
storage.acl_mailboxes = []