From 6db310531583385102c4139fe46a6eec0e5e1a0a Mon Sep 17 00:00:00 2001 From: Jan Zeleny Date: Thu, 27 Jan 2011 05:11:28 -0500 Subject: 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 --- ipalib/plugins/aci.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ipalib/plugins/aci.py') diff --git a/ipalib/plugins/aci.py b/ipalib/plugins/aci.py index 648f5111..4ddaf98a 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: -- cgit