def main(): for store in kopano.stores(): findroot = store.root.get_folder('FINDER_ROOT') if not findroot: print('creating FINDER_ROOT for store %s' % store.guid) # create findroot findroot = store.root.folder('FINDER_ROOT', create=True) # set PR_FINDER_ENTRYID # XXX pyko: store.findroot = .. entryid = HrGetOneProp(findroot.mapiobj, PR_ENTRYID) store.mapiobj.SetProps( [SPropValue(PR_FINDER_ENTRYID, entryid.Value)]) store.mapiobj.SaveChanges(0) # add findroot ACL findroot.permission(kopano.Group('Everyone'), create=True).rights = FINDROOT_RIGHTS
def main(): for store in kopano.stores(): upgrade_findroot(store) if store.archive_store: upgrade_findroot(store.archive_store)
# SPDX-License-Identifier: AGPL-3.0-only import kopano #user1 = kopano.user('user1') #user2 = kopano.user('user2') #user1.inbox.permission(user2, create=True).rights = ['read_items', 'delete_own'] for store in kopano.stores(): for permission in store.permissions(): print 'store', store, permission.member, permission.rights for folder in store.folders(): for permission in folder.permissions(): print 'folder', store, folder, permission.member, permission.rights