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:29:09 +0100
commitafb4e49627e87b11a4883ab4c365119ea3faf91c (patch)
treeb42da7a0cc59c86804ed2e30c63dd0e4dc75183f /pykolab
parent9f78455d7674af8c36fa71a36e1834407d339441 (diff)
downloadpykolab-afb4e49627e87b11a4883ab4c365119ea3faf91c.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 f1fd57b..c02cb8d 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(