summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/ldap/__init__.py
diff options
context:
space:
mode:
authorDaniel Hoffend <dh@dotlan.net>2014-08-19 13:28:43 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-08-19 13:28:43 +0200
commitdecbb7d37719074d1c63dd26fd1120c9646e7549 (patch)
tree7db89af2c04a6f7bf57d2873fdfa85315c5ea139 /pykolab/auth/ldap/__init__.py
parentef398699e6a041e718dfec2d67702edd45135e64 (diff)
downloadpykolab-decbb7d37719074d1c63dd26fd1120c9646e7549.tar.gz
fix splitting of imap acl/aci from ldap entry (#3351)
Diffstat (limited to 'pykolab/auth/ldap/__init__.py')
-rw-r--r--pykolab/auth/ldap/__init__.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 23b80e8..b9d0749 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1235,7 +1235,7 @@ class LDAP(pykolab.base.Base):
for acl_entry in entry[folderacl_entry_attribute]:
acl_access = acl_entry.split()[-1]
- aci_subject = ' '.join(acl_entry.split()[:-1])
+ aci_subject = ', '.join(acl_entry.split(', ')[:-1])
log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8)
@@ -1260,6 +1260,7 @@ class LDAP(pykolab.base.Base):
if not self.imap.shared_folder_exists(folder_path):
self.imap.shared_folder_create(folder_path, server)
+ self.imap.set_acl(folder_path, 'anyone', '')
if entry.has_key('kolabfoldertype') and \
not entry['kolabfoldertype'] == None:
@@ -1275,8 +1276,6 @@ class LDAP(pykolab.base.Base):
self.imap._set_kolab_mailfolder_acls(
entry['kolabfolderaclentry']
)
- else:
- self.imap.set_acl(folder_path, 'anyone', '')
if entry.has_key(delivery_address_attribute) and \
not entry[delivery_address_attribute] == None:
@@ -1617,7 +1616,7 @@ class LDAP(pykolab.base.Base):
for acl_entry in entry[folderacl_entry_attribute]:
acl_access = acl_entry.split()[-1]
- aci_subject = ' '.join(acl_entry.split()[:-1])
+ aci_subject = ', '.join(acl_entry.split(', ')[:-1])
log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8)
@@ -1642,6 +1641,7 @@ class LDAP(pykolab.base.Base):
if not self.imap.shared_folder_exists(folder_path):
self.imap.shared_folder_create(folder_path, server)
+ self.imap.set_acl(folder_path, 'anyone', '')
if entry.has_key('kolabfoldertype') and \
not entry['kolabfoldertype'] == None:
@@ -1650,8 +1650,6 @@ class LDAP(pykolab.base.Base):
folder_path,
entry['kolabfoldertype']
)
- else:
- self.imap.set_acl(folder_path, 'anyone', '')
if entry.has_key('kolabfolderaclentry') and \
not entry['kolabfolderaclentry'] == None:
@@ -1659,8 +1657,6 @@ class LDAP(pykolab.base.Base):
self.imap._set_kolab_mailfolder_acls(
entry['kolabfolderaclentry']
)
- else:
- self.imap.set_acl(folder_path, 'anyone', '')
if entry.has_key(delivery_address_attribute) and \
not entry[delivery_address_attribute] == None: