* 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
* 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>
* Prefix typecasting field flags
* Fix payload test
* Update flags for system tables and for field creation in app
* Revert cast-hash and cast-uuid
* Rename migrations file to current date
* Add query filter validation with permissions
* Allow all fields in test
* Revert test and add check for permissions with empty fields
* Add check for deep filters
* Add tests
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* fix M2O field deletion
* fix lint
* fix for MySQL
* Pull final dropColumn out of transaction
* Forget that, check for existing constraint before deleting it instead
* Fix lint warning in unrelated file
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Use script setup
* Start on export dialog
* Use new system field interface, replace limit with numeric input
* Set placeholder
* Add sort config
* Use folder picker, correct layoutQuery use
* Add local download button
* Allow writing exports to file
* Add notification after export
* Fix sort config, use new export endpoint
* Setup notification hints
* Add information notice
* Fix local limit, cancel button
* Add (basic) docs for export functionality
* Fix json export file format
* Implement xml batch stitching
* Resolve review points
* Adds the 'sort_updated' event emit after items are sorted
Signed-off-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>
* Updates the event name to 'sort_update'. Docs.
Signed-off-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>
* Updates the event name to `sort`
* Add item/to to hook, fix docs
Co-authored-by: Mihovil Ilakovac <mihovil.ilakovac@gmail.com>
* Add migration to remove default value from project_color
* Upgrade the default theme
* Do a pass over the header buttons
* Do another pass over --warning uses
* Little things
* Tweak smoke
* Use updated map
* Use dark system elements in dark mode
* Remove outdated files, update toasts
* Use correct delete button style for role
* Use primary for created point
* Tweak spacing in revisions section
* Use primary for sidebar sections
* Various color tweaks and changes
* Update base color palette
* Update "css reset" code
* Remove splashscreens, add default favicon
* Add primary highlight to datamodel page
* dark mode color update
* fix sign out hover color
* Does this help?!
* This fixes some loading issues
Fixes https://github.com/directus/directus/issues/10707
* Calculate default pretty background?
* Fix public view with logo
* Fix responsiveness of login page
* adjust notification group width to be equal
* Do an absolute pointless task that doesn't do anything
It was suggested that it could fix the stylelint error in tests, but alas
* Remove stylelint
Doesn't seem to play nice with script setup and other changes
Co-authored-by: Ben Haynes <ben@rngr.org>
* tsconfig loosened to match api
* integration test folder and script
* .env mock isn't needed
* mock-env, locations of tests
* I was wrong.
* Updated progress
* schemas => getSchema(), exported getColumnPreprocessor()
* change imports to allow build
* add MockClient as DB Client (should mock getDBClient())
* move authservice into. not used elsewhere
* test passing
* remove unneeded test for this PR
* removed unneded fields from rawItem
* formatting
* createOne test passing
* typo
* removed int specific jest.config
* use systemSchema over getSchema()
* this.knex over getDatabase()
* mock getDatabaseClient
* removed unused mock-env
* formatting
* removed unused collections from schema
* response => responseOnce
* more direct
* unused var
* more tests please!
* test for: createOne no permissions
* removed broken test for now
* clean up
* readOne tests what does into db and returned
* added bindings check
* added into db sql check
* moved tests outside src
* changed ts config
* cli test location changed
* removed looking for tests in src
* readding it for e2e tests? Seems fishy
* Integration tests for ItemsService user tables (#11208)
* renamed ItemsService test to match src file name
* add user table schema
* system/user tables use .each, formatting needed
* format system and user better in title
* tables/table=> schemas/schema
* filter _eq test passing
* comment for later and formatting
* everything in it's right place
* future proofing as more fields are added
* removed duplicate test
* formatting
* readMany() filter: _or
Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
* added knex check before getDatabase()
* Move util test to tests folder
Co-authored-by: Jay Cammarano <jaycammarano@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* base changes for cockroachdb
* allow creating of tables
* allow deleting of fields
* allow deleting of tables
* rebase
* fix migrations
* bump knex-schema-inspector to 1.7.0
* Update package-lock
* Add cockroach to debugging docker-compose file
* Remove unused import
* Tweak name in example.env
* Force nullable primary keys in cockroach
* Tweak shares migration to run on cockroach
* Rename var for clarification
* suggestion for migration helper
* change to schema and update remaining migrations
* Remove custom cockroach schema in favor of sharing with pg
* Fix migrations for CockroachDB
* Hopefully fix Oracle migrations 🤞🏻
* Make ~~aiden~~ oracle happy
* Resolve branching paths in migrations
* Enable tests for cockroach
* Fix test config
* One more config change for good measure
* Adjust test to match cockroach's bigint auto-int structure
* Increase request timeout for mssql
* Update api/src/database/helpers/schema/types.ts
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Oreille <33065839+Oreilles@users.noreply.github.com>
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
* add unsuported media type exception
* throw error when not multipart/form-data
* use unsupportedMediaType when checking import file
* add `UNSUPPORTED_MEDIA_TYPE` to Error Codes docs
* Add extension auto reloading to the API
This can be enabled by using the `EXTENSIONS_AUTO_RELOAD` env var.
* Add logger message indicating watch mode
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>