summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-06-25 11:51:35 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-06-25 11:51:35 +0200
commitf0f1f42a7946790b27236fdcbc7ff58336398253 (patch)
tree39e1c4d83dd870f7d2225609c20b0473aa3209b7 /pykolab
parente72a6103abcf8f41868e015d60a74d86151c3bd6 (diff)
downloadpykolab-f0f1f42a7946790b27236fdcbc7ff58336398253.tar.gz
Correct not having a sharedfolder_delivery_address_attribute set by default
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index aa9736b..57e08eb 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1179,16 +1179,18 @@ class LDAP(pykolab.base.Base):
# A delivery address is postuser+targetfolder
delivery_address_attribute = self.config_get('sharedfolder_delivery_address_attribute')
- if not delivery_address_attribute == None:
- if not entry.has_key(delivery_address_attribute):
- entry[delivery_address_attribute] = self.get_entry_attribute(
- entry['id'],
- delivery_address_attribute
- )
+ if delivery_address_attribute == None:
+ delivery_address_attribute = 'mail'
- if not entry[delivery_address_attribute] == None:
- if len(entry[delivery_address_attribute].split('+')) > 1:
- entry['kolabtargetfolder'] = entry[delivery_address_attribute].split('+')[1]
+ if not entry.has_key(delivery_address_attribute):
+ entry[delivery_address_attribute] = self.get_entry_attribute(
+ entry['id'],
+ delivery_address_attribute
+ )
+
+ if not entry[delivery_address_attribute] == None:
+ if len(entry[delivery_address_attribute].split('+')) > 1:
+ entry['kolabtargetfolder'] = entry[delivery_address_attribute].split('+')[1]
if not entry.has_key('kolabtargetfolder'):
entry['kolabtargetfolder'] = self.get_entry_attribute(