summaryrefslogtreecommitdiff
path: root/pykolab/auth/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/auth/__init__.py')
-rw-r--r--pykolab/auth/__init__.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index 82e2f4a..eb2d542 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -101,7 +101,12 @@ class Auth(object):
if self._auth.has_key(domain) and not self._auth[domain] == None:
return
- log.debug(_("Connecting to Authentication backend for domain %s") %(domain), level=8)
+ log.debug(
+ _("Connecting to Authentication backend for domain %s") %(
+ domain
+ ),
+ level=8
+ )
if not conf.has_section(section):
section = 'kolab'
@@ -194,7 +199,11 @@ class Auth(object):
return users
def synchronize(self, primary_domain, secondary_domains=[]):
- self.list_users(primary_domain, secondary_domains, callback=self._auth[primary_domain].sync_user)
+ self.list_users(
+ primary_domain,
+ secondary_domains,
+ callback=self._auth[primary_domain].sync_user
+ )
def domain_default_quota(self, domain):
self.connect(domain=domain)
@@ -228,6 +237,14 @@ class Auth(object):
return self._auth[domain]._get_user_attributes(user, attributes)
+ def search_mail_address(self, domain, mail_address):
+ self.connect(domain=domain)
+
+ if self.secondary_domains.has_key(domain):
+ domain = self.secondary_domains[domain]
+
+ return self._auth[domain]._search_mail_address(domain, mail_address)
+
def set_user_attribute(self, domain, user, attribute, value):
self.connect(domain=domain)