summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-28 13:29:09 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-28 13:30:03 +0100
commit919b7fd80416f9b9d59de7f3cfea2eb3f64efe7a (patch)
treefd37bd632eb07044be462485a6f9632f32197cd1 /pykolab
parentc7fc2981cfadf9001a3c0292e8ce0d873d834ee9 (diff)
downloadpykolab-919b7fd80416f9b9d59de7f3cfea2eb3f64efe7a.tar.gz
Preserve any secondary recipient email address attribute values that may have already been specified (#973)
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index a7be76c..18ac294 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -528,7 +528,7 @@ class LDAP(pykolab.base.Base):
if not entry.has_key('preferredlanguage'):
want_attrs.append('preferredlanguage')
- # If we wanted anything, now is the type to get it.
+ # If we wanted anything, now is the time to get it.
if len(want_attrs) > 0:
log.debug(_("Attributes %r are not yet available for entry %r") % (
want_attrs,
@@ -710,6 +710,11 @@ class LDAP(pykolab.base.Base):
log.debug(_("Recipient policy composed the following set of secondary " + \
"email addresses: %r") % (secondary_mail_addresses), level=8)
+ if entry.has_key(secondary_mail_attribute):
+ if isinstance(entry[secondary_mail_attribute], list):
+ secondary_mail_addresses.extend(entry[secondary_mail_attribute])
+ else:
+ secondary_mail_addresses.append(entry[secondary_mail_attribute])
if not secondary_mail_addresses == None:
log.debug(