[lc_ldap] Scopes appropriés pour la recherche dans l'historique
This commit is contained in:
parent
7fd176cc3d
commit
463896ffc3
1 changed files with 2 additions and 2 deletions
|
@ -335,7 +335,7 @@ class CransLdapObject(object):
|
||||||
l'argument optionnel ign_fields contient la liste des champs
|
l'argument optionnel ign_fields contient la liste des champs
|
||||||
à ignorer, HIST_IGNORE_FIELDS par défaut
|
à ignorer, HIST_IGNORE_FIELDS par défaut
|
||||||
Renvoie une liste de lignes de texte."""
|
Renvoie une liste de lignes de texte."""
|
||||||
res = self.conn.search_s(log_dn, 2, 'reqDN=%s' % self.dn)
|
res = self.conn.search_s(log_dn, ldap.SCOPE_SUBTREE, 'reqDN=%s' % self.dn)
|
||||||
res.sort(key=(lambda a: a[1]['reqEnd'][0]))
|
res.sort(key=(lambda a: a[1]['reqEnd'][0]))
|
||||||
out = []
|
out = []
|
||||||
for cn, attrs in res:
|
for cn, attrs in res:
|
||||||
|
@ -345,7 +345,7 @@ class CransLdapObject(object):
|
||||||
author = u"respbats"
|
author = u"respbats"
|
||||||
else:
|
else:
|
||||||
author = author.split(",", 1)[0]
|
author = author.split(",", 1)[0]
|
||||||
res = self.conn.search(author)
|
res = self.conn.search(author, scope=ldap.SCOPE_ONELEVEL)
|
||||||
if res != []:
|
if res != []:
|
||||||
author = res[0].compte()
|
author = res[0].compte()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue