forked from DGNum/gestioCOF
Merge branch 'kerl/discard_weird_ldap_users' into 'master'
Ignore les comptes LDAP bizarres (e.g. root) See merge request klub-dev-ens/gestioCOF!453
This commit is contained in:
commit
a9b6bc65a2
1 changed files with 1 additions and 0 deletions
|
@ -182,6 +182,7 @@ class LDAPSearch(SearchUnit):
|
|||
mail=attrs["mail"][0].decode("utf-8"),
|
||||
)
|
||||
for (_, attrs) in res
|
||||
if "uid" in attrs # Hack to discard weird accounts like root
|
||||
]
|
||||
except ldap.LDAPError as err:
|
||||
django_logger.error("An LDAP error occurred", exc_info=err)
|
||||
|
|
Loading…
Reference in a new issue