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__.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index eb2d542..09f0681 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -159,6 +159,23 @@ class Auth(object):
return self._auth[domain]._find_user(attr, value, domain=domain, **kw)
+ def find_recipient(self, attr, value, domain=None, **kw):
+ self.connect(domain)
+
+ if self.secondary_domains.has_key(domain):
+ log.debug(
+ _("Using primary domain %s instead of secondary domain %s")
+ %(
+ self.secondary_domains[domain],
+ domain
+ ),
+ level=9
+ )
+
+ domain = self.secondary_domains[domain]
+
+ return self._auth[domain]._find_recipient(attr, value, domain=domain, **kw)
+
def list_domains(self):
"""
List the domains using the auth_mechanism setting in the kolab