mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Implement permission/aci find by subtree
https://fedorahosted.org/freeipa/ticket/2321
This commit is contained in:
committed by
Martin Kosek
parent
c5689e7faf
commit
26ab9a504f
@@ -836,7 +836,18 @@ class aci_find(crud.Search):
|
||||
a.target['targetfilter']['expression'] != kw['filter']:
|
||||
results.remove(a)
|
||||
|
||||
# TODO: searching by: subtree
|
||||
if kw.get('subtree'):
|
||||
for a in acis:
|
||||
if 'target' in a.target:
|
||||
target = a.target['target']['expression']
|
||||
else:
|
||||
results.remove(a)
|
||||
continue
|
||||
if kw['subtree'].lower() != target.lower():
|
||||
try:
|
||||
results.remove(a)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
acis = []
|
||||
for result in results:
|
||||
|
||||
Reference in New Issue
Block a user