diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-01-27 05:11:28 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-01-31 11:24:39 -0500 |
commit | 6db310531583385102c4139fe46a6eec0e5e1a0a (patch) | |
tree | 2bd27176c369a8c922b49ba19c5ee051c7f011f3 /ipalib/plugins/aci.py | |
parent | 987507efd03f946a21a6dd352855513e087f1c6e (diff) | |
download | freeipa-6db310531583385102c4139fe46a6eec0e5e1a0a.tar.gz freeipa-6db310531583385102c4139fe46a6eec0e5e1a0a.tar.xz freeipa-6db310531583385102c4139fe46a6eec0e5e1a0a.zip |
Fixed permission lookup
Lookup based on --filter wasn't implemented at all. It did't show until
now, because of bug sitting on top of it which was resulting in internal
error. This patch fixes the bug and adds the filtering functionality.
https://fedorahosted.org/freeipa/ticket/818
Diffstat (limited to 'ipalib/plugins/aci.py')
-rw-r--r-- | ipalib/plugins/aci.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ipalib/plugins/aci.py b/ipalib/plugins/aci.py index 648f5111f..4ddaf98ab 100644 --- a/ipalib/plugins/aci.py +++ b/ipalib/plugins/aci.py @@ -780,7 +780,16 @@ class aci_find(crud.Search): except ValueError: pass - # TODO: searching by: filter, subtree + if 'filter' in kw: + if not kw['filter'].startswith('('): + kw['filter'] = unicode('('+kw['filter']+')') + for a in acis: + if 'targetfilter' not in a.target or\ + not a.target['targetfilter']['expression'] or\ + a.target['targetfilter']['expression'] != kw['filter']: + results.remove(a) + + # TODO: searching by: subtree acis = [] for result in results: |