mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-04 20:37:48 +02:00
implementing renaming entry
This commit is contained in:
parent
ac0a3473f7
commit
e3fe0b4bfb
1 changed files with 16 additions and 9 deletions
|
@ -289,6 +289,13 @@ class Backend(ldapcherry.backend.Backend):
|
||||||
content = self._str(attrs[attr])
|
content = self._str(attrs[attr])
|
||||||
attr = self._str(attr)
|
attr = self._str(attr)
|
||||||
new = {attr: content}
|
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:
|
if attr in old_attrs:
|
||||||
old = {attr: old_attrs[attr]}
|
old = {attr: old_attrs[attr]}
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue