summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-14 14:47:05 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-14 14:47:05 +0200
commitb006de19c34ef3678d30fa67c88baf5ce300f733 (patch)
tree133df8bf072289126f344d7c8938e4e67b61bbd2
parent7edf06594b70b6fc203e01341b573a07e65875cf (diff)
downloadpykolab-b006de19c34ef3678d30fa67c88baf5ce300f733.tar.gz
Correct the folder path at the earliest opportunity to avoid mis-firing set acl commands (#3315)
-rw-r--r--pykolab/auth/ldap/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index c276403..23b80e8 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1214,6 +1214,9 @@ class LDAP(pykolab.base.Base):
else:
folder_path = entry['cn']
+ if not folder_path.startswith('shared/'):
+ folder_path = "shared/%s" % folder_path
+
folderacl_entry_attribute = self.config_get('sharedfolder_acl_entry_attribute')
if folderacl_entry_attribute == None:
folderacl_entry_attribute = 'acl'
@@ -1593,6 +1596,9 @@ class LDAP(pykolab.base.Base):
else:
folder_path = entry['cn']
+ if not folder_path.startswith('shared/'):
+ folder_path = "shared/%s" % folder_path
+
folderacl_entry_attribute = self.config_get('sharedfolder_acl_entry_attribute')
if folderacl_entry_attribute == None:
folderacl_entry_attribute = 'acl'
@@ -1802,6 +1808,9 @@ class LDAP(pykolab.base.Base):
else:
folder_path = entry['cn']
+ if not folder_path.startswith('shared/'):
+ folder_path = "shared/%s" % folder_path
+
if not self.imap.shared_folder_exists(folder_path):
self.imap.shared_folder_create(folder_path, server)