summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-07-31 20:23:21 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-07-31 20:23:21 +0100
commit264e5351ef719d78c6b487483748283801db53ce (patch)
tree366e948fab52dc51ad5bf373c0259aa7dda9b3c7 /pykolab
parent71f1d48c648f70734a2b4fee90544e9ffafb8e25 (diff)
downloadpykolab-264e5351ef719d78c6b487483748283801db53ce.tar.gz
Use a dynamic user filter
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 8b2e841..4c4afc4 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -151,7 +151,15 @@ class LDAP(pykolab.base.Base):
self.connect()
self._bind()
- user_filter = self.config_get('user_filter')
+ config_base_dn = self.config_get('base_dn')
+ ldap_base_dn = self._kolab_domain_root_dn(self.domain)
+
+ if not ldap_base_dn == None and not ldap_base_dn == config_base_dn:
+ base_dn = ldap_base_dn
+ else:
+ base_dn = config_base_dn
+
+ user_filter = self.config_get_raw('user_filter') % ({'base_dn':base_dn})
_filter = '(&(|'