Commit Graph

379 Commits

Author SHA1 Message Date
rijkvanzanten
aaee7cc750 Fix having clause on postgres alias 2021-05-10 10:48:36 -04:00
Rijk van Zanten
c4ae4b66cc Finalize interface names (#5521)
* Rename button-links->presentation-links

* Rename checkboxes->select-multiple-checkbox

* Rename code->input-code

* Rename checkboxes files

* Rename color->select-color

* Rename divider->presentation-divider

* Rename dropdown-multiselect->select-multiple-dropdown

* Rename hash->input-hash

* Rename icon->select-icon

* Rename image->file-image

* Rename m2a-builder->list-m2a

* Rename many-to-many->list-m2m

* Rename many-to-one->select-dropdown-m2o

* Rename markdown->input-rich-text-md

* Rename notice->presentation-notice

* Rename one-to-many->list-o2m

* Rename radio-buttons->select-radio

* Rename repeater->list

* Rename text-input->input

* Rename textarea->input-multiline

* Rename toggle->boolean

* Rename tree-view->list-o2m-tree-view

* Rename wysiwyg->input-rich-text-html

* Use correct interfaces in system defaults

* Rename collection->system-collection

* Rename collections->system-collections

* Rename display-template->system-display-template

* Rename field->system-field

* Rename interface->system-interface

* Rename interface-options->system-interface-options

* Rename scope->interface-scope

* Rename tfa-setup->system-mfa-setup

* Fix oversights

* Remove old todo

* Some more tweaks

* Add migration, fix dropdown name in system use

* Merge numeric + input

* Replace dropdown->select-dropdown in app use

* Merge slug->input, user->select-dropdown-m2o

* Fix type issue

* Fix seeder field name
2021-05-06 16:49:32 -04:00
rijkvanzanten
ae1e22d116 Enforce new collections to have PK field
Fixes #5512
2021-05-06 11:19:51 -04:00
rijkvanzanten
e67702f1b5 Don't pass trx to async hook
Fixes #5460
2021-05-04 19:03:11 -04:00
Aiden Foxx
7df8cf2912 Added Oracle healthcheck fix (#5461) 2021-05-04 13:22:35 -04:00
Sebastian Kinzlinger
a4552e3752 Allow custom email subjects for invite and pw reset mail (#5446)
* Make email template overrides work

The ternary needs to be this way for custom email templates to be picked up.

* Allow custom subject lines for emails

Allow subject line to be passed into `inviteUser()` and `requestPasswordReset()`

* Fix typo

* Revert so only one change for PR

* fix typo

* Fix ts tests
2021-05-04 09:32:29 -04:00
Sebastian Kinzlinger
faa3ca7a06 Allow base Email override for standard emails (#5449)
* Make email template overrides work

The ternary needs to be this way for custom email templates to be picked up.

* Allow custom subject lines for emails

Allow subject line to be passed into `inviteUser()` and `requestPasswordReset()`

* Fix typo

* Fix typo

* eslint stuff

* Update users.ts
2021-05-04 09:31:13 -04:00
Rijk van Zanten
f3574deae0 Ask for value when changing nullable to not-nullable (#5400)
* Add ContainsNullValues exception abstraction

* Add dialog for null values when disabling non-null

Fixes #2934

* Add translation for CONTAINS_NULL_VALUE error

* Make dialog title translated
2021-04-30 15:27:18 -04:00
rijkvanzanten
74861e6f81 Add default display template for directus_files
Fixes #5364
2021-04-29 20:40:52 -04:00
rijkvanzanten
53f2d690dc Add comment 2021-04-29 20:13:36 -04:00
rijkvanzanten
ba98f23d3d Fix TS errors 2021-04-29 16:18:09 -04:00
rijkvanzanten
801e868554 Fix remaining eslint errors
h/t @paescuj
2021-04-29 15:55:12 -04:00
Pascal Jufer
acd41eb0be Syntax fixes (#5367)
* Declare return types on functions

And a very few other type related minor fixes

* Minor syntax fixes

* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)
2021-04-29 12:11:43 -04:00
José Varela
72b516a678 api: use current connection on collection service (#5369)
Allow to retrieve collections in the middle of a transaction
2021-04-29 10:32:16 -04:00
Rijk van Zanten
a64a5a124a Add files.upload hook (#5334)
* Allow events to be disabled

* Add files.upload, silence create/update on upload

Fixes #4728

* Document files.upload hook
2021-04-28 17:54:03 -04:00
rijkvanzanten
c225bbf762 Fix password policy check for no requirements
Fixes #5310
2021-04-28 14:51:17 -04:00
rijkvanzanten
6adc51383c Fix duplicate values in sort column causing havoc
Fixes #2921
2021-04-27 17:22:22 -04:00
Daniel Westman
9097641bf5 Add the ability to provide custom liquid layouts and partials (#5269)
* Add ability to provide custom liquid layouts and partials

* Allow overriding partilas with customs

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-04-27 20:41:31 +00:00
rijkvanzanten
207eda1d2d Fix login with non-existing user
Fixes #5299
2021-04-27 16:28:49 -04:00
rijkvanzanten
33f5927e38 Add missing email subjects
Fixes #5275
2021-04-27 11:34:32 -04:00
Rijk van Zanten
d25c35fee7 Add MailService (#5265)
* Create MailService

Fixes #5229, ref #3372, #4664, #4858, #5090, #3104, #3465, #2774, #3741

* Fix path to templates extensions

* Add mailservice example to hooks docs
2021-04-26 17:55:34 -04:00
rijkvanzanten
29797dfb97 Pass trx to items service in roles delete
Fixes #5244
2021-04-26 14:56:02 -04:00
rijkvanzanten
ad9ffb4647 Fix permissionsAction check in query read
Fixes #5257
2021-04-26 12:47:44 -04:00
Rijk van Zanten
f1e2338142 Add auth password policy / login attempts support (#5225)
* Check auth password policy on user modifications

* Show validation errors in drawer-batch

* Allow custom password policy, add placeholder

* Add UserSuspended exception

* Add user suspended error translation

* Move rate limiter creation into root helper

* Add login attempts support to authentication service

* Don't authenticate into settings service when checking password policy
2021-04-23 17:42:46 -04:00
rijkvanzanten
2c557b2c9e Fix alignment of repeater row previews 2021-04-22 13:34:36 -04:00
rijkvanzanten
1e3b64bf99 Fix upsert of collections meta 2021-04-22 10:28:27 -04:00
rijkvanzanten
f873f184f5 Fix deep querying in nested o2m in m2a structure 2021-04-22 10:10:41 -04:00
Rijk van Zanten
b40c62d257 Add support for SEARCH method (#5183)
* Add search method support for advanced get

* Add docs for SEARCH
2021-04-21 13:35:16 -04:00
Rijk van Zanten
3b05372713 Finalize services API (#5170)
* Start the xOne/xMany work

* Update update/upsert

* Finish updating itemsservice

* Add comments, add nested revisions on update

* Use new internal api

* Update collectionService to one/many structure

* Move files to one/many structure

* Move permissions to one/many structure

* Move relations service to one/many structure

* Move roles to one/many structure

* Move users service over

* Move webhooks to updated structure

* Move deprecated methods to the bottom

* Replace deprecated uses

* Use new methods in controllers, add batch update/delete by query

* Use updated methods in API

* Fix email being required

* Remove unnecessary DB call

* Fix batch update/delete validation
2021-04-20 18:06:27 -04:00
José Varela
7fbba272ad Fix before hook items transaction (#5136)
Since we might need information from database, we must provide the
current transaction, instead of the connection.
Otherwise, databases like SQLite which only accepts a single connection
will throw an error of knex timeout.

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-04-19 11:34:18 -04:00
Rijk van Zanten
40b9fb0fe6 Allow disabling activity/revisions (#5112)
* Add accountability column

* Add field info for accountability

* Add accountability to collection type

* Fetch accountability info from collection meta

* Add field name translation for accountability field

* Hide revisions drawer detail if revisions aren't available

* Only save activity where accountability flag matches

* Disable revisions for directus_presets

Fixes #3767

* Tweak field option naming
2021-04-16 16:26:18 -04:00
José Varela
e765d50783 Fix singleton primary key on update (#5096)
Since primary key is dynamic, we should use it instead of expect it would be 'id'
2021-04-16 10:16:28 -04:00
Rijk van Zanten
1fb4db1fda Add _regex validation operator (#5089)
Closes #2917
2021-04-15 17:25:51 -04:00
rijkvanzanten
25e7daf433 Parse fragments inside inlinefragments too
Ref #4283
2021-04-15 10:44:23 -04:00
rijkvanzanten
447eea4b3b Fix chaining filters w/ and/or in GQL
Fixes #5020
2021-04-14 12:16:48 -04:00
rijkvanzanten
40ecd1ec37 Fix fragments in nested relational sets
Fixes #4283
2021-04-14 12:12:32 -04:00
MiniDigger | Martin
6cf9008809 Send out error message for graphql execution errors (#5023) 2021-04-13 10:03:52 -04:00
cristobalbahe
b1f36b1939 Return instance of Date from payload.ts (#4992)
* Return instance of Date from payload.ts

* Revert formatter to date

* Use non-JS-Date object date scalar

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-04-12 17:59:37 -04:00
rijkvanzanten
9e90030d2a Ignore duplicate permissions row for same collection
Fixes #4985
2021-04-12 17:42:12 -04:00
Pierre
816d963c81 Fix error message (#4993)
`url` is an object from the library `url`.
It's `importUrl` that we need.
2021-04-12 09:45:14 -04:00
rijkvanzanten
5d1db82554 Fix auto-inserted timestamp transformers 2021-04-09 19:59:01 -04:00
Rijk van Zanten
c9d70de4c3 Rely on Knex for date parsing to vendor (#4949)
Fixes #3655
2021-04-09 18:36:58 -04:00
Rijk van Zanten
1b1e500ee9 Make user email case insensitive (#4941) 2021-04-09 12:33:31 -04:00
rijkvanzanten
706b07bb02 Run invite in transaction, rollback on error
Fixes #4569
2021-04-08 17:33:04 -04:00
rijkvanzanten
f6e0b2cc81 Clear archive_field / sort_field of directus_collections on field delete
Fixes #3737
2021-04-08 17:11:16 -04:00
rijkvanzanten
5b14a8e715 Fix typo in oas spec output
Fixes #4867
2021-04-08 17:01:14 -04:00
Joonas Palosuo
9c621c6e20 feat: add delete event emitting to fields service (#4840)
* feat: add delete event emitting to fields service

* Inline event scope

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-04-08 16:39:31 -04:00
rijkvanzanten
86d232c03c Fix deep args + union resolvers 2021-04-07 14:06:23 -04:00
Dustin
632895eb68 Storage: S3 ACL & Content Type (#4694)
* add S3 env config for ACL. pass along file type for S3 upload

* add STORAGE_<LOCATION>_ACL to S3 docs
2021-04-07 12:15:47 -04:00
Rijk van Zanten
d49898d54d fix/4873 (#4885)
* Fix permissions check for /system endpoint

* Filter out empty / corrupted fields/collections rows in get-schema

Fixes #4873
2021-04-07 11:39:54 -04:00