Chris Meyers
a8213661fd
basic fact search grammar
...
* Establish a base grammar for handling json path specification and
value matching. With boolean logic support and parenthesis grouping
i.e. (a.b.c="value") and ((a.b="foo") or (a="bar"))
* generate Q() results for passing to Host.objects.filter()
* Hooked up via /api/v1/hosts?host_filter=...
* DynamicFilterField added to store host filter as string with grammar
parser attached as static methods for later use by DynamicInventory &
continued use by host_filter=...
2017-04-03 15:32:21 -04:00
Alan Rominger
83bc654b15
Merge pull request #5812 from AlanCoding/no_loops_for_hackers
...
Block loops in querystring filters
2017-03-21 10:50:35 -04:00
Ryan Petrello
a69dfced74
Merge remote-tracking branch 'origin/release_3.1.2' into devel
2017-03-21 10:39:16 -04:00
AlanCoding
925712e3ec
block users from making looping filters which can DoS Tower
2017-03-21 10:16:49 -04:00
Wayne Witzel III
ea1c4ee1d5
correct unintentional stripping of - from order by fields
2017-03-13 18:13:55 -04:00
Ryan Petrello
bad9670a0b
Merge remote-tracking branch 'origin/release_3.1.2' into devel
2017-03-10 10:57:03 -05:00
Ryan Petrello
f4d4c43d94
prohibit order_by= for sensitive fields
...
see: #5526
2017-03-10 08:49:59 -05:00
Wayne Witzel III
27fc64eb56
value_to_python should encode lookup fields as ascii
2017-03-08 12:30:30 -05:00
Aaron Tan
b105e2b9b6
Remove unicode marker from filter error message.
2017-03-07 16:48:51 -05:00
Matthew Jones
b14336bdff
Alias unified job template search fields for presentation
...
The polymorphic accessors have a name that is different than our
normal presentation name for these types. This aliases them for the
presentation layer and then handles processing them when they are
given as filters.
2017-02-22 15:33:47 -05:00
Ryan Petrello
fe053dca83
Merge pull request #5495 from ryanpetrello/blacklist_sensitive_search_keys
...
blacklist certain sensitive fields and relations as search arguments
2017-02-22 10:28:03 -05:00
Matthew Jones
9e2e119022
Make polymorphic_ctype aliasing work in filters
...
Previousy this would fall through and get caught by the type checker
2017-02-21 21:32:33 -05:00
Ryan Petrello
73a5a1e61e
mark i18n strings for denied API search parameters
2017-02-21 16:18:06 -05:00
Ryan Petrello
d24fb32358
blacklist certain sensitive fields and relations as search arguments
...
see: #5465
see: #5478
2017-02-21 16:18:02 -05:00
Matthew Jones
46605eb591
Fix an issue filtering with non ints against foreign keys
...
I feel like this probably worked at one time but no longer does. It
makes me wonder if ForeignObjectRel was meant to be the catchall but
no longer is.
2017-02-21 12:33:15 -05:00
AlanCoding
a57d8fe9fd
treat GFJ and FJ and M2M all the same for type in querystring
2017-02-20 17:11:08 -05:00
AlanCoding
d8d874d964
treat m2m fields as FK in filter python coercion
2017-02-17 11:06:29 -05:00
Wayne Witzel III
0562e4baad
Rewrite type to polymorphic_ctype__model for certain filter requests
2017-02-09 09:55:25 -05:00
Chris Church
f735c86d2b
Merge pull request #4425 from cchurch/related-search-fields
...
Related search fields
2016-12-15 15:01:24 -05:00
Chris Church
b9aab38185
Handle TypeError when lookup is not valid for a given field.
2016-12-14 13:20:19 -05:00
Chris Church
ea10ff8b93
Initial pass at related search fields.
2016-12-13 21:44:09 -05:00
AlanCoding
2092e67f6f
docs and lazy eval for role_level filter
2016-12-08 12:28:46 -05:00
AlanCoding
adebe00ca5
filter.py implementation of role level filtering
2016-12-06 20:43:15 -05:00
Aaron Tan
9e4655419e
Fix flake8 E302 errors.
2016-11-15 20:59:39 -05:00
Chris Church
9fc30643ca
Prevent filtering on password fields.
2016-10-03 16:18:41 -04:00
Akita Noek
b57739a800
Converted except T,e expressions to except T as e
2016-06-27 15:12:37 -04:00
Akita Noek
1abba522b0
Resurrect global .distinct() call (mostly)
...
This mostly reverts 3c67971e78a12bd94536aa5464f0bc1ea46ba1ee with
the minor difference that we only apply this when we're filtering,
which is apparently necessary without some notable overhaul since
the filtering we're doing will get stuck in as filters, which will
generate inner joins, which can result in duplicates if the thing
we're joining with is a one to many or many to many, which most
things are.
With this patch we still need to be generating naturally distinct
querysets with any `get_queryset` methods, which will still be much
more effecient when filtering is not involved.
This fixes #2032 and probably a bunch of other undiscovered issues.
2016-05-24 22:19:51 -04:00
Wayne Witzel III
f457e54a23
Merge pull request #1672 from wwitzel3/devel
...
adjusting how we restrict __in based on PR feedback
2016-04-25 09:31:18 -04:00
Akita Noek
e697a5441c
Merge pull request #1663 from anoek/distinct-removal
...
.distinct() removal from global filter_queryset method
2016-04-25 08:46:01 -04:00
Wayne Witzel III
b6b02bee99
adjusting how we restrict __in based on PR feedback
2016-04-22 17:54:44 -04:00
Wayne Witzel III
4ef291b00b
do not allow requests with empty values in __in values
2016-04-22 15:39:33 -04:00
Akita Noek
44a8da83c2
Removed all encompassing .distinct() call for all views
...
This .distinct() call applied .distinct() to all list query sets. Most
query sets are already unique, and adding .distinct causes the database
to do a lot of extra work. Views that rely on this behavior will be
rooted out during the hardening sprint and .distinct() will be added to
the individual querysets as needed instead of applying this everywhere.
2016-04-22 12:30:03 -04:00
Akita Noek
6ea99583da
Mass active flag code removal
2016-03-15 09:29:55 -04:00
Chris Church
60224cdbe4
Update Django to 1.8 and DRF to 3.3, add new Django migrations, update serializers/pagination/metadata, update browsable API styling.
2016-02-02 17:48:04 -05:00
John Mitchell
32d1c0e4db
fixed copyright date
2015-06-11 16:10:23 -04:00
Matthew Jones
22bbf21c09
Documenting new system tracking endpoints
2015-06-01 13:39:24 -04:00
Matthew Jones
b3da3b34a3
Changing some legal headers for python source files
2015-05-29 12:10:39 -04:00
Matthew Jones
e784595119
Initial implementation of fact api endpoints
2015-05-05 14:47:58 -04:00
Matthew Jones
698b58e19f
filter utility method got caught up in the python boolean dragnet
2015-01-26 15:00:49 -05:00
Matthew Jones
e807507203
Missing one boolean converter from filters after conversion
2015-01-26 12:50:23 -05:00
Matthew Jones
b5db74a7d9
Generalize the python boolean converter so we can use it in RBAC methods
2015-01-26 11:57:21 -05:00
Matthew Jones
2916ebf0c0
Improve query time by removing a check from the order by filter handler
2014-11-21 15:57:01 -05:00
Chris Church
e5054eeb65
AC-1040 Support ordering by type field.
2014-03-30 19:52:52 -04:00
Chris Church
fe5d154d76
AC-1040 Exposed list of choices for type field.
2014-03-29 14:34:22 -04:00
Chris Church
52ab418abb
AC-1040 Unified job template and unified job views.
2014-03-28 01:25:25 -04:00
Chris Church
c677503d8d
AC-1040 Fix filtering to work again with __regex suffix.
2014-03-25 14:44:45 -04:00
Chris Church
6504a8ae40
AC-1040 Fix broken dashboard view. Add backwards-compatible support for old project and inventory source filters.
2014-03-25 13:43:18 -04:00
Chris Church
11d8387120
AC-990 Make job event filtering by host work even when not capturing hosts M2M. Also fix unit tests to skip checking hosts M2M.
2014-02-06 15:07:42 -05:00
Chris Church
2b7af0a2ec
Happy new year!!!
2014-01-02 11:51:43 -05:00
Chris Church
112fe089d9
AC-728 Added chain__ filter prefix.
2013-11-26 13:24:45 -05:00