Commit Graph

1147 Commits

Author SHA1 Message Date
Rijk van Zanten
b613ce1d18 Improve recursive filtering (#4493)
* Use lowercase chars only

* Fix join alias mapping

* Pass keys as array in delete

* Cleanup delete controller

* Don't catch unexpected errors
2021-03-11 17:56:04 -05:00
Evgeny Vlasov
7bd5dc5c9f Add env for cookie domain (#4490)
* Add env for cookie domain

* fix doc

Co-authored-by: Власов Евгений <yavlas12@mts.ru>
2021-03-11 14:10:15 -05:00
rijkvanzanten
8f048a8c32 Remove unnecessary migration
Got confused by Knex no longer executing dropForeign on SQLite :C

Fixes #4470
2021-03-11 07:37:43 -05:00
Rijk van Zanten
4248b187bb Implement unique constraint support (#4467)
* Allow creating unique fields

* Allow removing unique constriant

* Show unique constraint error as validation error in app
2021-03-10 17:35:21 -05:00
Rijk van Zanten
971a18c219 Database Error Abstraction (#4465)
* Start on database-error abstraction layer

* Add SQLite error abstraction

* Enable SQLite foreign key support

* Cleanup sqlite dialect slightly

Does it matter? Not really!

* Add MySQL error abstraction

* WIP Almost done with MSSQL

* Add correct error handling for MS SQL

* Fix mysql errors by not relying on value order

* Don't rely on sql in postgres exception translation

* Fix sqlite error parsing

* Remove foreign key constraint from activity to collections

A collection can be DB-only, but we still want to track activity for non-meta collections

* Translate error on update as well
2021-03-10 17:16:15 -05:00
Rijk van Zanten
97dcdad847 OracleDB baby steps (#4464)
* Allow external connections in oracle debug

* Fix oracle overview query

* Use correct alive check for oracle

* Remove unused import

* Validate correct env vars for oracle
2021-03-10 16:58:49 -05:00
Rijk van Zanten
291643e0b4 Fix installing on MS SQL (#4455)
Fixes #3158, fixes #3608
2021-03-09 18:43:03 -05:00
Thijs-Jan
df107352c2 Resolve relative CONFIG_PATH (#4453) 2021-03-09 16:03:01 -05:00
Ben Haynes
a769711772 default color 2021-03-08 15:12:58 -05:00
rijkvanzanten
e8222d2a28 Add reset_url allow list for password reset request 2021-03-08 13:48:59 -05:00
rijkvanzanten
a12b148b17 Default generated .env permissions to -rw-r----- 2021-03-08 13:32:13 -05:00
rijkvanzanten
ada85b20ce Fix build on rc 45
Fixes #4418
2021-03-08 11:18:14 -05:00
rijkvanzanten
6b78c34e43 Parse deep object structure as json
Fixes #4428
2021-03-08 08:22:25 -05:00
rijkvanzanten
acc8b4fd08 Use mssql instead of tedious for client name
Fixes #4427
2021-03-08 07:39:57 -05:00
rijkvanzanten
fa7daa1f86 Revert seeds change 2021-03-05 10:32:56 -05:00
rijkvanzanten
d3c58e2e8c Parse between/nbetween as arrays 2021-03-05 10:13:16 -05:00
Ben Haynes
ccf885f950 dynamic colors for system activity displays 2021-03-04 20:13:47 -05:00
Ben Haynes
275b9521f2 webhooks dynamic seed colors 2021-03-04 19:46:56 -05:00
Ben Haynes
7599e0a7aa primary color and various design updates 2021-03-04 18:50:47 -05:00
rijkvanzanten
1e89c25872 Remove "locked" field from directus_fields
Closes #3925
2021-03-04 18:41:59 -05:00
rijkvanzanten
5afa6c04fc Create field in transaction
Fixes #4211
2021-03-04 17:35:39 -05:00
rijkvanzanten
61c5522c06 Treat filter "null" as null
Closes #4386
2021-03-04 17:12:44 -05:00
rijkvanzanten
ec436170a0 Fix file import for admins 2021-03-04 17:02:29 -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
rijkvanzanten
d9a09719cf Fix width/height of exif orientation image
Fixes #4323
2021-03-04 10:28:47 -05:00
rijkvanzanten
31b5dbfe66 Fix validation error on preset creation with app access
Fixes #4369
2021-03-03 19:57:04 -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
c3dd7023a7 Don't surface forbidden reasoning 2021-03-03 17:33:11 -05:00
rijkvanzanten
738ef8622d Don't leak collection name in param exception 2021-03-03 17:04:44 -05:00
Rijk van Zanten
7ab359eacf Throw forbidden error on /fields (#4366)
Fixes #4349
2021-03-03 17:04:39 -05:00
reolat
24548680d5 Create allow list for custom migration file extensions (#4358) 2021-03-03 12:24:04 -05:00
rijkvanzanten
ba4810bac3 Prevent direct(us_) access through /items 2021-02-26 17:30:51 -05:00
rijkvanzanten
09a4b673eb Fix filtering by number
Fixes #3917
2021-02-26 17:30:20 -05:00
Rijk van Zanten
1d9ffc2d7f Tweak asset metadata on upload (#4317)
* Update sharp

* Only read image metadata after upload

Preserves animated gifs and other files

Fixes #4297

* Rotate thumbnails based on exif data

Ref #4206
2021-02-26 17:18:17 -05:00
rijkvanzanten
f6c4ab0e6a Check if table still exists before auto-dropping columns 2021-02-26 16:08:10 -05:00
Ben Haynes
83b1aa53c2 desaturate all system dividers 2021-02-26 11:32:52 -05:00
rijkvanzanten
c2a5622cef Remove unused environment variable 2021-02-26 10:49:19 -05:00
rijkvanzanten
6a2f4c42a0 Fix permission presets parsing on mysql
Fixes #4199
2021-02-26 10:30:16 -05:00
Rijk van Zanten
db30acbb8a Move sortField to relationship setup (#4304)
* Add migration

* Add sort field to relation types

* Remove sortfield options in favor of relationship

* Add sort field configuration to relational setup

* Save m2a sortfield on the correct row

* Add default sort field to system data
2021-02-25 19:13:36 -05:00
rijkvanzanten
f088074d48 Only return full 500 stack trace to authenticated admin users 2021-02-25 19:12:18 -05:00
rijkvanzanten
f2d8c9e5be Check file create permissions before fetching external file 2021-02-25 19:03:38 -05:00
Rijk van Zanten
b0f3c0591a Add "explicit" o2m update syntax (#4295)
* Add support for a new o2m relational update structure

* Document these wonders
2021-02-25 14:08:57 -05:00
rijkvanzanten
4cfa64e752 Fix outgoing headers in /graphql
Fixes #4264
2021-02-24 11:06:55 -05:00
rijkvanzanten
5908822ea9 Fix between query validation, add example to docs
Fixes #4269
2021-02-24 10:44:20 -05:00
Pyll Gomez
aeb4ec0472 API hooks for event added for auth.login (#4255)
* Rotate JPG image on upload #4206

* fixes #3949 width/height generated for gif and tif

* API hooks for event added for auth.login #4079

* updated doc for api hooks for new auth.login event

* Style tweaks

* Update docs

* Tweak docs some more

* Spelling error

* Allow non-required flags and pass to hook

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-02-24 10:37:13 -05:00
rijkvanzanten
3d33b9db55 Allow and ignore null schema in field update
Fixes #4254
2021-02-23 17:06:35 -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
435d6ec84a Validate DB_CLIENT env var before creating DB connection
Fixes #3556
2021-02-23 11:28:56 -05:00
rijkvanzanten
2a738b7b52 Scope order by clause to table
Fixes #4246
2021-02-23 10:53:25 -05:00