summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-07 17:47:35 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-03-07 17:47:35 +0000
commit43f44f19107fdc97120558d91caf334efb92fcea (patch)
treedd5f83ad2941c72913988ea5ffa2bda08a8045f5
parent8f7b40e18c268f3dfa17315373e587bf1dafacd9 (diff)
downloadpykolab-43f44f19107fdc97120558d91caf334efb92fcea.tar.gz
Also set the acls on additional folders
Make sure we seek out the quota_attribute setting in the right location
-rw-r--r--pykolab/imap/__init__.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index 313b62c..0e82ac0 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -121,6 +121,7 @@ class IMAP(object):
}
self.imap.cm(folder_name)
+
if additional_folders[additional_folder].has_key("annotations"):
for annotation in additional_folders[additional_folder]["annotations"].keys():
self.imap.setannotation(
@@ -129,10 +130,23 @@ class IMAP(object):
"%s" %(additional_folders[additional_folder]["annotations"][annotation])
)
+ if additional_folders(additional_folder].has_key("acls"):
+ for acl in additional_folders[additional_folder]["acls"].keys():
+ self.imap.sam(
+ folder_name,
+ "%s" %(acl),
+ "%s" %(additional_folders[additional_folder]["acls"][acl])
+ )
+
def set_user_folder_quota(self, users=[], primary_domain=None, secondary_domain=[], folders=[]):
self._connect()
- _quota_attr = self.conf.get('cyrus-imap', 'quota_attribute')
+ if self.conf.has_option(primary_domain, 'quota_attribute')
+ _quota_attr = self.conf.get(primary_domain, 'quota_attribute')
+ else:
+ auth_mechanism = self.conf.get('kolab', 'auth_mechanism')
+ _quota_attr = self.conf.get(auth_mechanism, 'quota_attribute')
+
_inbox_folder_attr = self.conf.get('cyrus-sasl', 'result_attribute')
default_quota = self.auth.domain_default_quota(primary_domain)