summaryrefslogtreecommitdiffstats
path: root/pykolab/auth/__init__.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-04 14:32:58 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-07-04 14:32:58 +0100
commit209af0b2cb5529fff2ae7db5bc30cf14e1a7c7d6 (patch)
treee8fb8b4093c7b48302aee5cd897da3065231f7a6 /pykolab/auth/__init__.py
parent3a55c071692e1846d4a36ae4589d6924360c49cd (diff)
downloadpykolab-209af0b2cb5529fff2ae7db5bc30cf14e1a7c7d6.tar.gz
Provide supportControls search before actual search, but use normal search where appropriate
Diffstat (limited to 'pykolab/auth/__init__.py')
-rw-r--r--pykolab/auth/__init__.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index 17ab4b8..3e44532 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -127,6 +127,10 @@ class Auth(object):
self._auth[domain]._disconnect()
+ def find_user(self, attr, value, domain=None):
+ self.connect(domain)
+ return self._auth[domain]._find_user(attr, value, domain=domain)
+
def list_domains(self):
"""
List the domains using the auth_mechanism setting in the kolab
@@ -152,12 +156,19 @@ class Auth(object):
return domains
- def list_users(self, primary_domain, secondary_domains=[]):
+ def list_users(self, primary_domain, secondary_domains=[], callback=None):
self.connect(domain=primary_domain)
- users = self._auth[primary_domain]._list_users(primary_domain, secondary_domains)
+ users = self._auth[primary_domain]._list_users(
+ primary_domain,
+ secondary_domains,
+ callback
+ )
self.disconnect(domain=primary_domain)
return users
+ def synchronize(self, primary_domain, secondary_domains=[]):
+ self.list_users(primary_domain, secondary_domains, callback=self._auth[primary_domain].sync_user)
+
def domain_default_quota(self, domain):
self.connect(domain=domain)
return self._auth[domain]._domain_default_quota(domain)
@@ -167,7 +178,9 @@ class Auth(object):
return self._auth[domain]._domain_section(domain)
def get_user_attribute(self, domain, user, attribute):
+ self.connect(domain=domain)
return self._auth[domain]._get_user_attribute(user, attribute)
def set_user_attribute(self, domain, user, attribute, value):
+ self.connect(domain=domain)
self._auth[domain]._set_user_attribute(user, attribute, value)