Changeset View
Changeset View
Standalone View
Standalone View
pykolab/imap/__init__.py
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | def set_acl(self, folder, identifier, acl): | ||||
} | } | ||||
mode = 'set' | mode = 'set' | ||||
for char in acl: | for char in acl: | ||||
if char == '-': | if char == '-': | ||||
mode = 'subtract' | mode = 'subtract' | ||||
continue | continue | ||||
if char == '+': | if char == '+': | ||||
continue | |||||
mode = 'add' | mode = 'add' | ||||
continue | |||||
acl_map[mode] += char | acl_map[mode] += char | ||||
current_acls = self.imap.lam(self.folder_utf7(folder)) | current_acls = self.imap.lam(self.folder_utf7(folder)) | ||||
for current_acl in current_acls.keys(): | for current_acl in current_acls.keys(): | ||||
if current_acl == identifier: | if current_acl == identifier: | ||||
_acl = current_acls[current_acl] | _acl = current_acls[current_acl] | ||||
break | break | ||||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | def user_mailbox_create(self, mailbox_base_name, server=None): | ||||
log.info(_("Waiting for the Cyrus IMAP Murder to settle...")) | log.info(_("Waiting for the Cyrus IMAP Murder to settle...")) | ||||
last_log = time.time() | last_log = time.time() | ||||
time.sleep(0.5) | time.sleep(0.5) | ||||
_additional_folders = None | _additional_folders = None | ||||
if not hasattr(self, 'domain'): | if not hasattr(self, 'domain'): | ||||
self.domain == None | self.domain = None | ||||
if self.domain == None and len(mailbox_base_name.split('@')) > 1: | if self.domain == None and len(mailbox_base_name.split('@')) > 1: | ||||
self.domain = mailbox_base_name.split('@')[1] | self.domain = mailbox_base_name.split('@')[1] | ||||
if not self.domain == None: | if not self.domain == None: | ||||
if conf.has_option(self.domain, "autocreate_folders"): | if conf.has_option(self.domain, "autocreate_folders"): | ||||
_additional_folders = conf.get_raw( | _additional_folders = conf.get_raw( | ||||
self.domain, | self.domain, | ||||
▲ Show 20 Lines • Show All 621 Lines • Show Last 20 Lines |