mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-25 18:54:29 +01:00
implementing renaming entry
This commit is contained in:
parent
ac0a3473f7
commit
e3fe0b4bfb
@ -289,6 +289,13 @@ class Backend(ldapcherry.backend.Backend):
|
||||
content = self._str(attrs[attr])
|
||||
attr = self._str(attr)
|
||||
new = {attr: content}
|
||||
# if attr is dn entry, use rename
|
||||
if attr.lower() == self.dn_user_attr.lower():
|
||||
ldap_client.rename_s(
|
||||
dn,
|
||||
ldap.dn.dn2str([[(attr, content, 1)]])
|
||||
)
|
||||
else:
|
||||
if attr in old_attrs:
|
||||
old = {attr: old_attrs[attr]}
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user