mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-25 02:34:31 +01:00
proper exception in ldap backend
adding proper management of none existant user in group function if user doesn't exist.
This commit is contained in:
parent
0a4db74f1f
commit
5a45a24055
@ -442,6 +442,8 @@ class Backend(ldapcherry.backend.Backend):
|
||||
# but with MOD_DELETE
|
||||
ldap_client = self._bind()
|
||||
tmp = self._get_user(self._str(username), ALL_ATTRS)
|
||||
if tmp is None:
|
||||
raise UserDoesntExist(username, self.backend_name)
|
||||
dn = tmp[0]
|
||||
attrs = tmp[1]
|
||||
attrs['dn'] = dn
|
||||
|
Loading…
Reference in New Issue
Block a user