Commit Graph

1193 Commits

Author SHA1 Message Date
Pascal Jufer
123c3b1182 Add perm check for sqlite, upload, extensions dirs (#7310)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-08-10 09:39:47 -04:00
Rijk van Zanten
917d575319 Flush caches on server (re)start (#7294) 2021-08-09 23:22:36 +02:00
Jay Cammarano
d8889d777e Only treat tinyint(1) and tinyint(0) as booleans (#7287)
* added an if catch for tinyint(1) and tinyint(0)

* made suggested changes toLowerCase()
2021-08-09 15:36:24 -04:00
Nicola Krumschmidt
aca8c1078e Only loads app extensions if SERVE_APP is true (#7275)
This also ensures API/App only load their respective extensions in dev.
2021-08-09 09:44:27 -04:00
Rijk van Zanten
f6a7853e7d Rely on RETURNING when possible (#7259)
* WIP use returning clause instead of max from id

* Use returning where applicable, fallback to fetch

Fixes #6279
2021-08-07 00:21:50 +02:00
rijkvanzanten
1867489a3e Treat sqlite integerfirst as int 2021-08-06 14:26:00 -04:00
Bernat Vadell
a9515109f8 smtp set tls ciphers option (#7082)
* smtp set tls ciphers option

* standarize tls config

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-08-06 18:44:45 +02:00
Bernat Vadell
2193339aef Fix internal server error (#7240)
* fix internal server error when create items with special pk and not required other fields

* Only run validation check when validation rules exist

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-08-06 18:43:45 +02:00
Rijk van Zanten
4c074512f6 Fix import of perf hook on node < 16 (#7249)
Fixes #7221
2021-08-06 16:47:38 +02:00
Rijk van Zanten
30eb83dddd Add logger statement on password request failures (#7248)
Closes #7221
2021-08-06 10:04:51 -04:00
Pascal Jufer
bea3794f0a Switch to exifr for image metadata extraction (#6922)
* Switch to exifr for image metadata extraction

* Fix migrations on pg

* Prevent double divider

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-08-05 19:19:18 -04:00
Rijk van Zanten
627d843aed Update/tweak groups (#7229)
* Split detail/raw groups, tweak accordion

* Add update groups migration
2021-08-06 00:27:26 +02:00
Rijk van Zanten
faa71c7595 Add cache connection fallbacks (#7226) 2021-08-05 22:27:10 +02:00
Rijk van Zanten
78ed041ee1 Warn if a collection includes a space (#7223) 2021-08-05 20:02:38 +02:00
Rijk van Zanten
d0f6cb35e3 Support dynamic variables in conditional fields (#7202)
* Move accountability type to shared

* Rely on shared for parse-filter

* Install date-fns

* Support dynamic variables in conditional fields

Closes #7157
2021-08-05 01:51:15 +02:00
Rijk van Zanten
787adc9ee0 Allow JSON in env variables (#7201) 2021-08-05 01:20:57 +02:00
Rijk van Zanten
ce234f3165 Fix timezone problems in dateTime type (#7200)
* Disable useTZ option from MS SQL by default

* Fix recognition of OracleDB timestamp

* Smoothen out knex default in useTz for datatypes

* Fix timezone parsing for dateTime fields

* Remove unused import
2021-08-05 01:19:24 +02:00
Rijk van Zanten
e8bb89e05d Don't trigger updates for pre-existing selected items (#7176)
Fixes #4147
2021-08-04 01:47:06 +02:00
rijkvanzanten
fe354dc4c7 don't fetch unused column 2021-08-03 19:01:46 -04:00
Rijk van Zanten
725c95783c Show any sso login warnings in stdout (#7170)
* Show any sso login warnings in stdout

Ref #6897

* Throw more detailed error on email extraction

* Fix CSVs in env var value not cast as array
2021-08-04 00:22:52 +02:00
rijkvanzanten
e4add23ce6 Fix linter warnings 2021-08-03 17:30:36 -04:00
Rijk van Zanten
c312115ef3 Fix nested m2a collection permission retrieval (#7168)
Fixes #7086
2021-08-03 23:29:34 +02:00
Rijk van Zanten
ef3d618d6c Add support for app-required field state (#7166)
* Add "required" option to fields

* Move some exceptions to shared

* Do client side validation for required

* Add conditional required support
2021-08-03 23:04:24 +02:00
Rijk van Zanten
9eace1c9ff Prevent duplicate alias fields from being created (#7142)
Fixes #7107
2021-08-02 22:16:13 +02:00
Jay Cammarano
0b17fdcf81 Warn on Missing Migrations (#6580)
* added warn when migrations have not all been run

* fixed imports

* added better error handling

* Update api/src/database/index.ts

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* migration is its own file

* added custom migrations path

* Handle non-existing custom migrations folder

Co-authored-by: jaycammarano <jaycammarano@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-08-02 15:52:10 -04:00
Rijk van Zanten
6e9102d414 Fix cache-key generation for query params (#7139)
Fixes #7131
2021-08-02 21:17:09 +02:00
Rijk van Zanten
38896075d4 Add accordion group (#7130)
* Start on accordion group

* Add some basic styling to accordion sections

* Update style, add multiple option, add shift-click

* Only toggle-all on multiple option

* Finish styling of accordion sections

* Tweak styling

* Add 'start' option to accordion

* Rename group-raw -> group-standard, add header option

* Replace group-divider with group-standard
2021-08-02 18:12:52 +02:00
rijkvanzanten
72ff97266c Fix linter warnings 2021-07-31 13:59:19 -04:00
Rijk van Zanten
956c590f0c Stall login/pw reset to prevent email leaking (#7105) 2021-07-30 15:01:07 -04:00
Rijk van Zanten
a55d1bc4a7 Fix users accountability tracking (#7104) 2021-07-30 19:17:06 +02:00
Rijk van Zanten
14254bae62 Fix top level perm check on nested m2a records (#7060)
Fixes #6317
2021-07-28 23:11:54 +02:00
Bernat Vadell
fd8c54b10e Calendar range render (#6775)
* Fixes #6699

* Clean up calendar index a bit

* Format date output using non timezoned output

* Match output format to input format

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-28 22:29:09 +02:00
Rijk van Zanten
1597423e1a Don't throw 500 on missing email (#7050)
Fixes #6948
2021-07-28 19:55:20 +02:00
Rijk van Zanten
6da9524413 Fix type checking in password reset controller (#7042)
Lifted from #6942

Fixes #6927
2021-07-28 18:08:18 +02:00
rijkvanzanten
2e442b2757 Fix return type in roles service 2021-07-28 12:04:55 -04:00
Rijk van Zanten
206f2380b5 Fix cache-key causing problems in memcached (#7021)
* Add memcached to docker-compose

* Use object hash for cache key

Fixes #6823
2021-07-28 01:18:09 +02:00
Rijk van Zanten
f81dfda20f Don't return collections outside of cache (#7020)
Fixes #6602
2021-07-28 00:57:31 +02:00
Rijk van Zanten
628e4ead58 Fix MS SQL unique constraint field name extraction (#7019)
Fixes #6703
2021-07-28 00:47:54 +02:00
Rijk van Zanten
945d5d94e0 Add new /utils/cache/clear endpoint (#7014) 2021-07-27 23:32:25 +02:00
rijkvanzanten
f7064d69dc Fix return type on gql service 2021-07-27 16:51:14 -04:00
Rijk van Zanten
07fb7d67a8 Prevent from deleting the last admin user (#7008)
* Prevent from deleting the last admin user

Fixes #6990

* Add missing return types
2021-07-27 20:30:13 +00:00
Rijk van Zanten
96c16ff693 Default SERVE_APP to true (#7003)
Fixes #6993
2021-07-27 17:32:41 +02:00
Saad Irfan ⚡️
afdeb980cb Support for notifying user if an update is available for Directus CLI (#6852)
* Notify user if an update is available

* Replaced console log with logger

* Fix lint error

* Update api/src/start.ts

* Make update check non-blocking

* Remove unused async call

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-07-26 19:36:16 -04:00
Rijk van Zanten
b0ec803b0c Wait for the database to be ready in bootstrap step (#6987) 2021-07-26 23:10:17 +00:00
Rijk van Zanten
c25fa70d84 Fix pino deprecation warning (#6984) 2021-07-27 00:08:09 +02:00
Rijk van Zanten
92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00
Rijk van Zanten
87ab9b3dfa Improve error reporting on CLI bootstrap command (#6977)
* Show full DB error on bootstrap connection issue

* Show full DB error on bootstrap
2021-07-26 17:10:10 +00:00
Nicola Krumschmidt
7d8aa9fced Replace DIRECTUS_DEV env var with NODE_ENV and SERVE_APP (#6929) 2021-07-22 23:47:56 +02:00
Adrian Dimitrov
efe7b076a3 Add default-folder option (#3209)
* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Update after rebase

* Add storage_default_folder setting, use folder when deploy file

* Fix files options; Add default label option for folder interface.

* Fix set folder for file

* UX

* Add migration for column, undo seed change

* Update nomanclature

* Make sure file library always submits folder, cleanup setting retrieval

* Use indexName on down migrate

* Fix import default folder, rename customPresets->folderPreset

* Rename interface import

* Use undefined as default folder

* Remove deprecated lang file

* Fix display of folder interface, treat null as value

* Move shared composable

* Remove unused ref

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 17:29:21 -04:00
Tim
2c9ff3bca6 Allow custom transformations of assets (#6593)
* Allow custom transformations of assets

This exposes one query parameter `transforms`, which is a JSON array of
shard transformation operations.

It also updates the asset presets. The UX for this still needs some work

* Rename options to arguments for presets

More explicit

* options -> arguments in setting spec

* Better errors for invalid JSON in asset presets

* Add limit to transforms query parameter

* Use flattened option for extra transforms

* Fix placeholder color of code input

* Allow "simple mode" aliases

* Add documentation

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 15:57:47 -04:00