Commit Graph

140 Commits

Author SHA1 Message Date
rijkvanzanten
61c5522c06 Treat filter "null" as null
Closes #4386
2021-03-04 17:12:44 -05:00
Martijn Boland
bed7890a6b Filter O2M collections with a subquery instead of joins to prevent cartesian products (#4278)
* Cherry-picked fix for 4078 from mssql-to-success branch

* Only use o2m joins in subqueries

* Allow more array nesting in query params

* Clarify naming

* Return empty nested o2m sets as array

Co-authored-by: Martijn Boland <martijn@taiga.nl>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-03-04 16:58:13 -05:00
Rijk van Zanten
30f631b0b2 Allow deeply nested queries with deep (#4384)
* Allow deeply nested query using _prefix

* Support deeply nested deep-queries

* Parse nested deep in GraphQL correctly

* Update docs
2021-03-04 12:59:54 -05:00
Nicola Krumschmidt
08293b8570 Update Knex to version 0.95.0 (#4374)
* Update Knex to version 0.95.0

* Fix formatting in schema dialects

* Fix Knex imports

* Update package-lock

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-03-03 19:37:44 -05:00
rijkvanzanten
09a4b673eb Fix filtering by number
Fixes #3917
2021-02-26 17:30:20 -05:00
rijkvanzanten
6a2f4c42a0 Fix permission presets parsing on mysql
Fixes #4199
2021-02-26 10:30:16 -05:00
rijkvanzanten
5908822ea9 Fix between query validation, add example to docs
Fixes #4269
2021-02-24 10:44:20 -05:00
rijkvanzanten
142b250c8d Use pino error instead of fatal
Fatal throws flushing error when using 'pretty' log style
2021-02-23 11:29:37 -05:00
rijkvanzanten
2a738b7b52 Scope order by clause to table
Fixes #4246
2021-02-23 10:53:25 -05:00
Rijk van Zanten
ee3eb2818e Fix null case in directus_permissions.fields (#4161)
Fixes #4095
2021-02-18 17:06:48 -05:00
rijkvanzanten
1624681487 Remove .flat usage
Fixes #4118
2021-02-17 19:00:54 -05:00
rijkvanzanten
3615612da0 Apply search to filter_count
Fixes #4121
2021-02-17 10:47:57 -05:00
rijkvanzanten
510cbe4ed4 Fix missing type info 2021-02-11 18:14:55 -05:00
rijkvanzanten
1464e690cd Fix init command in CLI
Fixes #4017
2021-02-11 18:07:19 -05:00
Rijk van Zanten
b7d87e581a System permissions for app access (#4004)
* Pass relations through schema, instead of individual reads

* Fetch field transforms upfront

* Fix length check

* List if user has app access or not in accountability

* Load permissions up front, merge app access minimal permissions

* Show app access required permissions in permissions overview

* Show system minimal permissions in permissions detail

* Fix app access check in authenticate for jwt use

* Fix minimal permissions for presets

* Remove /permissions/me in favor of root use w/ permissions

* Fix logical nested OR in an AND

* Use root permissions endpoint with filter instead of /me

* Allow filter query on /permissions

* Add system minimal app access permissions into result of /permissions

* Remove stray console log

* Remove stray console.dir

* Set current role as role for minimal permissions

* Fix no-permissions state for user detail

* Add filter items function that allows altering existing result set
2021-02-11 12:50:56 -05:00
Rijk van Zanten
4144cecef5 Fix validation structure in authorization service (#3967)
Fixes #3597
2021-02-08 15:13:14 -05:00
Rijk van Zanten
6108de4f3e Scope column name in table on search query (#3966)
Fixes #3964
2021-02-08 14:16:37 -05:00
rijkvanzanten
e6f8f910b5 Check for allowed fields existence before reading
Fixes #3853
2021-01-29 17:09:28 -05:00
rijkvanzanten
040af268d7 De-dupe parent records when filtering on joins
Fixes #3798
2021-01-27 10:42:44 -05:00
rijkvanzanten
6b5cdc780f Don't error on Date in query param validation
Fixes #3806
2021-01-25 18:06:02 -05:00
rijkvanzanten
8af48c16e4 Fix m2o limit, fix wildcard permission check
Fixes #3791
2021-01-25 17:04:13 -05:00
Oreilles
40a20baa27 Fix wrong number casting in query 2021-01-19 08:46:02 +01:00
rijkvanzanten
8e3151d34f Improve search
Fixes #3443, fixes #3393
2021-01-15 19:07:05 -05:00
rijkvanzanten
05f0bc967e Turn hash into type
Fixes #3542
2021-01-12 17:08:19 -05:00
rijkvanzanten
c1f87113bf use express types instead of custom versions 2021-01-12 16:06:35 -05:00
WoLfulus
c5f3802da3 Replace express-async-handler for a local function. 2020-12-22 17:11:08 -03:00
Aleksandar Stanisic
9c1308b8b6 Enable reversing _null, _nnull, _empty and _nempty 2020-12-21 00:06:52 +01:00
WoLfulus
7f3e095a1f Enable base and admin routes when developing a Directus app 2020-12-17 11:42:50 -03:00
rijkvanzanten
2c032cd44d Fix validation object
Fixes #3375
2020-12-14 19:09:35 -05:00
rijkvanzanten
ea1853acfb Alias joins to prevent naming conflicts in nested queries
Fixes #3294
2020-12-08 17:55:40 -05:00
Igor Savin
7cddb458cb Run prettier across app and api 2020-12-08 02:22:00 +02:00
rijkvanzanten
9ce3f264b6 Bad log, no log 2020-12-01 12:45:09 -05:00
rijkvanzanten
cc2b18d711 Cas't string default value NULL to null
Fixes #2924
2020-11-27 20:53:51 -05:00
rijkvanzanten
100937c2dd Fix *.*.* fields using wrong default fields
Fixes #3219
2020-11-27 19:44:53 -05:00
rijkvanzanten
665ab42c5d Merge branch 'main' into m2a-interface 2020-11-27 13:55:06 -05:00
rijkvanzanten
7891920209 Fix nested or filter in permissions
Fixes #3167
2020-11-23 10:24:00 -05:00
rijkvanzanten
0002393486 Allow nested objects in env vars
FE: DB_SSL__CA=example
2020-11-20 15:19:38 -05:00
rijkvanzanten
563fdaba9c Fix shared fields in m2a fetch 2020-11-17 11:44:29 -05:00
rijkvanzanten
168e96ed03 Support field scoping in fields parameter 2020-11-17 11:27:09 -05:00
rijkvanzanten
e8f0d70322 Replace deep-map, fix _and filter parsing 2020-11-12 16:09:51 -05:00
rijkvanzanten
0c72ee6b1d Fix deep filters in app, fix current-user/current-role in filters 2020-11-12 14:12:05 -05:00
rijkvanzanten
236bde3c59 Fix deep query validation 2020-11-12 13:08:11 -05:00
rijkvanzanten
ae0fcc28fe Use dropdown for boolean default value 2020-11-11 16:10:33 -05:00
rijkvanzanten
a08d47971b Fix connection string connections 2020-11-10 17:22:45 -05:00
rijkvanzanten
1d53345da2 Only set single when passed true
Or '' or '1'

Fixes #913
2020-11-10 13:30:20 -05:00
rijkvanzanten
8cbdfb409b Use prefetched schema info 2020-11-09 17:13:48 -05:00
rijkvanzanten
528112314d Remove outdated tests, fix imports 2020-11-09 12:29:01 -05:00
rijkvanzanten
11dc1b6462 Don't auto-nest o2m if you don't have read access 2020-11-06 14:57:57 -05:00
rijkvanzanten
ee5211ce02 Fix nesting parent item recursively
Fixes #906
2020-11-06 14:15:26 -05:00
rijkvanzanten
a30da7e4c0 Update primary key checks for new versino of schema inspector 2020-11-04 15:18:45 -05:00