summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/aci.py
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2011-01-27 05:11:28 -0500
committerRob Crittenden <rcritten@redhat.com>2011-01-31 11:24:39 -0500
commit6db310531583385102c4139fe46a6eec0e5e1a0a (patch)
tree2bd27176c369a8c922b49ba19c5ee051c7f011f3 /ipalib/plugins/aci.py
parent987507efd03f946a21a6dd352855513e087f1c6e (diff)
downloadfreeipa-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.py11
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: