mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
baseldap: make subtree deletion optional in LDAPDelete
https://fedorahosted.org/freeipa/ticket/5250 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
33aba6f35e
commit
2964b019d9
@ -1570,6 +1570,8 @@ class LDAPDelete(LDAPMultiQuery):
|
||||
|
||||
has_output_params = global_output_params
|
||||
|
||||
subtree_delete = True
|
||||
|
||||
def execute(self, *keys, **options):
|
||||
ldap = self.obj.backend
|
||||
|
||||
@ -1605,6 +1607,8 @@ class LDAPDelete(LDAPMultiQuery):
|
||||
except errors.NotFound:
|
||||
self.obj.handle_not_found(*nkeys)
|
||||
except errors.NotAllowedOnNonLeaf:
|
||||
if not self.subtree_delete:
|
||||
raise
|
||||
# this entry is not a leaf entry, delete all child nodes
|
||||
delete_subtree(dn)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user