* Process relational collection's permissions in functions
* Fix deep usage of functions in GraphQL
* Add unit test for updated SQL query with permissions
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Validate type of items' primary keys
* Update tests
* Update validations
* Remove DB specific check for statusCode in existing e2e test
* Extract as util function
* Add unit test
* Refactor to generic validateKeys
* Sort keys to ensure order
* Set query limit as the number of keys
* Add query limit only when reading by keys
* Update test
* Check if keys is of array type
* 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
* 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
* 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>
* Add "authenticate" filter hook that allows custom auth check
* Start on test
* Update Jest, restructure API tests, start implementing authenticate test
* Move access token verify to util function
* Ensure jest can show inline warnings on correct lines
* Update is-directus-jwt to use jsonwebtoken decode + add tests
* Remove unused package
* Tweak and finish + test authenticate
* Tweak test
* Add authenticate filter to docs
* Don't scan tests for codeql
* No seriously, ignore tests
* 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>