Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_acl_cleanup.py
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | def execute(*args, **kw): | ||||
imap.connect() | imap.connect() | ||||
folders = imap.lm() | folders = imap.lm() | ||||
for folder in folders: | for folder in folders: | ||||
acls = imap.list_acls(folder) | acls = imap.list_acls(folder) | ||||
if not aci_subject == None: | if not aci_subject == None: | ||||
if aci_subject in acls.keys(): | if aci_subject in acls: | ||||
log.debug(_("Deleting ACL %s for subject %s on folder %s") % ( | log.debug(_("Deleting ACL %s for subject %s on folder %s") % ( | ||||
acls[aci_subject], | acls[aci_subject], | ||||
aci_subject, | aci_subject, | ||||
folder | folder | ||||
), level=8) | ), level=8) | ||||
imap.set_acl(folder, aci_subject, '') | imap.set_acl(folder, aci_subject, '') | ||||
#else: | #else: | ||||
#for _aci_subject in acls.keys(): | #for _aci_subject in acls: | ||||
# connect to auth(!) | # connect to auth(!) | ||||
# find recipient result_attr=aci_subject | # find recipient result_attr=aci_subject | ||||
# if no entry, expire acl | # if no entry, expire acl | ||||
No newline at end of file |