diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-05-11 16:15:58 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-05-15 08:54:22 +0200 |
commit | 26ab9a504f504f59cfd3af929dbeac2ddc201ed3 (patch) | |
tree | b9bbc13e62a4e4187433131ad18e5a1cc5743a4a /ipalib | |
parent | c5689e7fafc688165945e83dd4bf63dd568b3650 (diff) | |
download | freeipa-26ab9a504f504f59cfd3af929dbeac2ddc201ed3.tar.gz freeipa-26ab9a504f504f59cfd3af929dbeac2ddc201ed3.tar.xz freeipa-26ab9a504f504f59cfd3af929dbeac2ddc201ed3.zip |
Implement permission/aci find by subtree
https://fedorahosted.org/freeipa/ticket/2321
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/aci.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ipalib/plugins/aci.py b/ipalib/plugins/aci.py index b0be26f5c..f7c6039a9 100644 --- a/ipalib/plugins/aci.py +++ b/ipalib/plugins/aci.py @@ -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: |