* add basic util function for later use
* sketch up useRelationMultiple implementation
* update relation util and start reworking relational interfaces
* support filter in m2o
* start working on useRelationMultiple
* continue working on relational foundation
* finish basic use-relation-multiple composable
* get o2m pretty close to being finished
* finish up list-o2m
* replace old interfaces
* copy existing interface
* rewrite vue file
* highlight deleted items
* use Search instead of Get
* support selection on m2m
* finish up m2m
* replace old files
* update files interface
* fix permission checks
* fix styling
* add sketches to explain relations
* rewrite m2a interface
* add usage hint to use-relation-multiple
* update file interface to use new composable
* update file-image interface
* fix image not being shown
* revert names
* fix selection of existing items
* fix loading selected items
* in between commit
* update translations interface
* try using composable recursive
* try linear approach on value modeling
* finish rewriting list-o2m-tree-view interface
* revert api changes
* fix sorting for list-o2m-tree-view
* fix selected items in created array
* Add direct download option to files interface
* Fix linter warnings
* Weird that it's being difficult, but ok
* Cast existingItemCount to number at all times
* fix page gets set below 1
* align pagination to the right
* highlight deselecting row
* show min 1 skeleton loader
* only filter selected when item exists
* fix working on new items
* Fix linter warning
* fix deselecting selected items
* show different icon depending if icon is local
* add changes from #12611
* Add _some vs _none support to o2m
* finish filtering out selected items
* Use get instead of search request
* fix save and stay
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* fix adding items to m2o
* Fix linter warning
* Handle no-type better
* Clean up axios usage
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Adds x-directus-cache response header with HIT value
* Added ENV var for cache header and MISS, UNCACHEABLE
* Rename CACHE_HEADER_KEY -> CACHE_STATUS_HEADER
Tad opinionated, but I feel like it describes the functionality slightly better
* Return miss consistently
Uncacheable doesn't quite describe what's happening. The user actively requests the cache to be skipped, which should result in an expected miss. The value isn't un-cacheable, the cache is skipped on purpose
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* add `Last-Modified` header to `/assets/*` responses
only affects assets with a valid `modified_on` DB field
* update docs about `Last-Modified`
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Split filter key to get m2a nested collection name
* Add the collection field to the required permissions
* Adding required permissions to relational table
* Tidy up code
* Remove UTC conversion from date, time and datetime fields
* Fix mysql / maria timestamps when not in UTC timezone
* Add sequential tests with node timezone change
* Increase connection attempt check
* Add error catching in tests flow setup
* Check for server connectivity
* Fix promises
* Fix timestamp inconsistencies
* Revert to previously used parseISO
* Ensure database and directus connection
* Add another timezone to test positive and negative GMT
* Set local server hostname to localhost
* Add tests for SQLite
* Use notNullable primary key
* Revert connection testing sleep duration
* Fix nested transactions on SQLite
* Increase MSSQL request timeout
* Add type override flag for SQLite
* Remove commented code
* Add type override flags for Oracle
* Updated test file path
* Increase test servers launch timeout
* Increase test servers launch timeout
* Update format of tests
* Fix typo
* Increase test timeout for CockroachDB
* Add type overrides when creating fields through collections service
* Remove time field type conversion for Oracle
* Update collections list in test
* Remove check for time field in Oracle
* Add missing continue...
* Remove database override
* Add note for SQLite
* Rename flags and extract shared util
* Abstract remaining DB specific checks
* Revert flags renaming except renaming of test files
* Use date helper to add field flag
* Move field date typecasting upstream
* Use timestamp helper for date-created and date-updated
* Fix tests
* Remove unused vars
* Add tests for date-created
* Increase connection attempt count
* Fix test for mariadb
* Increase allowable difference to account for delays
* Add tests for date-updated
* Fix tests again for mariadb
* Add date helpers post merge
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Add permissions check for relational field only if child has filter
* Allow id field for actions such as update and delete
* Use primary key instead of id
* Add test
* [Related to #11292] Safe Metadata Upload
- Created FILE_METADATA_ALLOWLIST
- Added test library for `FilesService`
* Rename ALLOWLIST->ALLOW_LIST to be consistent with other env vars
* Make sure it still works for files without Exif
* Prevent breaking changes in metadata formatting
* Allow * for all
* Fix md sup
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Added default locale before login
* Use project_language as default language for new users
* Revert "Use project_language as default language for new users"
* Allow user's language field to be nullable; Use project_language whenever language is unset;
* Apply suggestions from code review
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
* Make "Project Default" option in system-language interface configurable
* Set language only if user language is not null
* Introduced translation for project_language field; Use translation in system-language interface
* Set app language only from app.vue;
Included watcher to restore project_language if user's language is (re)set to null
* Removed .alter() in knex migration since it's not needed for changing default and breaks checks
* Reverted previous change in migration; .alter() is needed for changing column defaults
* Reverted migration to use .defaultTo(null) to set default value
* Update position of project language field in settings
* Fix cockroachdb test error in knex migration
* Fix cockroachdb test error in knex migration
* Apply migration fix also on oracle databases
* Apply changes from code review
* Rename migration to fix migration key error
* Move setLanguage calls to server.ts and hydrate.ts
Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
Co-authored-by: jaycammarano <jay.cammarano@gmail.com>
Co-authored-by: Christian Rendl <cr@mutor.at>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Fix filter permissions for relational fields
* Add tests for filtering of top level relational field with and without permissions on relational table
* Find read permission only
* Update test with more permissions
* Rename date functions to fn, add json_array_length for pg
* Add json count to mssql
* Add json array count support to other vendors
* Add UI for selecting API functions
* Make it not break
* Render functions in filter preview better
* Include functions in field altering
* Add schema access to database helper
* Allow filtering against o2m/m2m/m2a count
* Add data function execution helpers in utils
* Fix type issue
* Inject function results in validate step
* Render field keys with function names translated
* Allow selecting nested/functions in field validation step
* Make sure number comparisons are treated as numbers
* Add check if instanceof date when casting to a Number
* Prevent selecting foreign keys for junction sort (#12463)
* [SDK] Add further request options to `items` functions (#12503)
* add possibility to set further options to the request
* fix options type
* add typings to interface
* add test if headers are passed thourght
* create reusable options param
* set higher priority to options param
* Small stylistic cleanup
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Jürg Hunziker <juerg.hunziker@gmail.com>
* add icon & color to bookmarks
* update current bookmark title on edit
* clean up edit bookmark dialog on cancel
* remove unused bookmark-edit component
* interaction improvements
* sort based on scope and alphabetically
* prevent hover when locked & use tooltip
* Reduce size of right hand icon in bookmark
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Use layout-wrapper to list presets
Right now, it's not possible to pass a custom column to layout-wrapper. So the `Scope` is not available anymore, because it's a computed value and we do not support computed values as of the time being.
* update batch selection & button styles
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Add field validation column
* Add frontend config for validation
* Make it work
* Add regex to filter configuration
* Fix const/let
* Add custom validation message support
* Add custom validation message tooltip inline
* Fix custom names in validation errors up top
* Fix type error
* Nog eentje om het af te leren
* resolve unused import warnings
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
* Fix incorrect saving of field special in migration
* Add hotfix
* Run typecasting again just in case...
* Rename migration
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>