summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-12 15:07:28 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2011-09-12 15:07:28 (GMT)
commit9eb9bfcbbdcc38681cf706be140debb3ba016d42 (patch)
tree5bfb33913bb81d5c7a1f3a357f6366e354b54cdd
parent6f712c0fbec5983cf10626739613a9b29222bd27 (diff)
downloadpykolab-9eb9bfcbbdcc38681cf706be140debb3ba016d42.tar.gz
Make sure to translate secondary domains into the primary domain key before triggering the domain name space specific authentication technology instance
-rw-r--r--pykolab/auth/__init__.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/pykolab/auth/__init__.py b/pykolab/auth/__init__.py
index b75b214..aa6e7ba 100644
--- a/pykolab/auth/__init__.py
+++ b/pykolab/auth/__init__.py
@@ -138,6 +138,10 @@ class Auth(object):
def find_user(self, attr, value, domain=None, **kw):
self.connect(domain)
+
+ if self.secondary_domains.has_key(domain):
+ domain = self.secondary_domains[domain]
+
return self._auth[domain]._find_user(attr, value, domain=domain, **kw)
def list_domains(self):
@@ -184,16 +188,32 @@ class Auth(object):
def domain_default_quota(self, domain):
self.connect(domain=domain)
+
+ if self.secondary_domains.has_key(domain):
+ domain = self.secondary_domains[domain]
+
return self._auth[domain]._domain_default_quota(domain)
def domain_section(self, domain):
self.connect(domain=domain)
+
+ if self.secondary_domains.has_key(domain):
+ domain = self.secondary_domains[domain]
+
return self._auth[domain]._domain_section(domain)
def get_user_attribute(self, domain, user, attribute):
self.connect(domain=domain)
+
+ if self.secondary_domains.has_key(domain):
+ domain = self.secondary_domains[domain]
+
return self._auth[domain]._get_user_attribute(user, attribute)
def set_user_attribute(self, domain, user, attribute, value):
self.connect(domain=domain)
+
+ if self.secondary_domains.has_key(domain):
+ domain = self.secondary_domains[domain]
+
self._auth[domain]._set_user_attribute(user, attribute, value)