summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-08-02 11:53:15 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-08-02 11:53:15 +0100
commita7bcbfccf3bb3fc7808ea625075e066f0783b1c8 (patch)
treedc78ef382b1bb9b644fc30dfa3732dff3a9f41f5 /pykolab
parent090bd2f0bfbf2c6dbdde0b1fe915ce2e37f8ead0 (diff)
downloadpykolab-a7bcbfccf3bb3fc7808ea625075e066f0783b1c8.tar.gz
Use the base_dn obtained unless the proper routine finds different
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 4c4afc4..ba9f017 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -831,8 +831,16 @@ class LDAP(pykolab.base.Base):
_filter = "(%s=%s)" % (attr, value)
+ 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
+
return self._search(
- self.config_get('base_dn'),
+ base_dn,
filterstr=_filter,
attrlist=[
'*',
@@ -1794,7 +1802,13 @@ class LDAP(pykolab.base.Base):
entry_dn = self.entry_dn(entry_id)
- base_dn = self.config_get('base_dn')
+ 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
for _type in ['user', 'group', 'sharedfolder']:
__filter = self.config_get('kolab_%s_filter' % (_type))