128 Commits

Author SHA1 Message Date
Alexandre BODIN
feced1d72b
Move api tests to root of repo with same structure (#16242) 2023-04-05 10:32:20 +02:00
Ben Irvin
801e3db415 add traverse query
fix single type

fix query

sanitize pagination count params

add comments

Cleanup the params/filters sanitize helpers

sanitize association resolver

Sanitize sort

fix graphql single type

fix graphql types

fix addFindQuery

Sanitize fields

Update sanitize sort to handle all the different formats

Update fields sanitize to handle regular strings & wildcard

Fix non scalar recursion

Add a traverse factory

Add visitor to remove dz & morph relations

Replace the old traverse utils (sort, filters) by one created using the traverse factory

add sanitize populate

await args

fix async and duplicate sanitization

sanitize u&p params

Add traverse fields

Fix traverse & sanitize fields

add traverse fields to nested populate

sanitize admin api filter queries

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

sanitize sort params in admin API

todo

make token fields unsearchable with _q

sanitize delete mutation

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

fix errors on queries without ctx

rename findParams to sanitizedParams

Sanitize queries everywhere in the content manager admin controllers

sanitize single type update and delete

Ignore non attribute keys in the sanitize sort

Fix the sanitize query sort for nested string sort

Fix permission check for the admin

typo

sanitize upload

sanitize admin media library

sanitize admin users

Add missing await

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

set U&P users fields to searchable:false

add token support to createContentAPIRequest

add searchable:false to getstarted U&P schema

remove comment

sanitize component resolver

remove await

add searchable false to the file's folder path

Fix admin query when the permission query is set to null

add basic tests for filtering private params

add tests for fields

add pagination tests

Fix admin user fields not being sanitized

Fix convert query params for the morph fragment on undefined value

Traverse dynamic zone on nested populate

Handle nested sort, filters & fields in populate queries + handle populate fragment for morphTo relations

Sanitize 'on' subpopulate

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

don't throw error on invalid attributes

check models for snake case column name instead of assuming they are operators

Add first batch of api tests for params sanitize

Fix sort traversal: handle object arrays

Put back removePassword for fields,sort,filters

Add schemas and fixtures for sanitize api tests

Add tests for relations (sanitize api tests)

Move constant to domain scope

Rename sanitize params to sanitize query

Fix typo

Cleanup fixtures file

Fix variable name conflict

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>

Update comment for array filters

Rename sanitize test

Test implicit & explicit array operator for filter

Remove unused code
2023-03-15 14:59:19 +01:00
Gustav Hansen
1d99c3f217 Chore: Remove request dependency 2023-02-10 09:04:32 +01:00
Pierre Noël
3ff32e91eb use entityService + redo permissions 2022-09-06 12:17:54 +02:00
Pierre Noël
247499dd8a add tests 2022-09-06 12:17:54 +02:00
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Alexandre Bodin
0ae14c06cb 1st fix pass 2022-08-11 10:20:48 +02:00
Convly
0b8c7b59c6 Merge branch 'master' into features/typescript 2022-07-25 09:30:18 +02:00
Pierre Noël
2e926e63ca revert strapi.start to load and listen 2022-07-12 17:57:01 +02:00
Pierre Noël
5706191547 fix unit tests open handles 2022-07-12 17:57:01 +02:00
Pierre Noël
d48d91ee1c fix open handles 2022-07-12 17:57:00 +02:00
Convly
fb720da187 Fix directories resolve 2022-04-04 12:02:21 +02:00
Pierre Noël
83d321a981 better handle env variables in e2e tests 2022-01-24 17:01:51 +01:00
Jean-Sébastien Herbaux
7f285fb755
[V4] Enhanced sanitize & remove restricted relations from content API's payloads (#11411)
* Rework sanitizeEntity, first iteration

* remove console.log

* Remove useless comments

* Fix e2e tests

* Fix up user e2e test

* Fix remove-restricted-relations visitor

* Handle grapqhql resolver, prevent access to restricted relations

* Handle polymorphic relation in the related visitor

* Remove morph attribute if empty

* Use only the find action to check if the relation is allowed
2021-11-04 15:47:53 +01:00
Pierre Noël
6fd9f780c7 Merge branch 'v4/ctb' into v4/plural-name-in-CTB 2021-10-22 12:33:48 +02:00
Convly
c7a0747f96 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-27 19:10:05 +02:00
Pierre Noël
69cc0554fe fix e2e tests 2021-09-27 17:56:05 +02:00
Convly
20b20a0f92 Fix e2e test for UP, i18n & upload + various i18n fixes 2021-09-27 17:17:24 +02:00
Pierre Noël
64940edbae CTB handles singular and plural names 2021-09-14 15:30:37 +02:00
Alexandre Bodin
0f3f984ea7 Init migration v4
- Hooks registry
- D&P CT migrations
- i18N CT migrations
- Umzug with js / sql migrations
- Eslint updates
2021-09-13 12:03:12 +02:00
Alexandre Bodin
ef12731bd3 Fix missing public access 2021-09-08 18:47:22 +02:00
Alexandre Bodin
4befaea442 Register test auth before load 2021-09-08 18:23:52 +02:00
Alexandre Bodin
a14b16af51 Move admin auth to global auth system 2021-09-08 16:16:16 +02:00
Alexandre Bodin
566805c8ae Update test on /api 2021-09-07 21:29:34 +02:00
Alexandre Bodin
37bacdb691 Start fixing tests 2021-09-07 21:03:30 +02:00
Alexandre Bodin
ae8c970661 Make use of new server in router middleware before removing it 2021-09-07 15:11:04 +02:00
Alexandre Bodin
575cbbdc7c Migrate plugin getters 2021-08-19 23:30:49 +02:00
Pierre Noël
63cc0832f2 Merge branch 'v4/backend' into pluginAPI/loadPlugin 2021-08-13 15:43:04 +02:00
Alexandre Bodin
c122056f2c Fix search test and entity manager count query 2021-08-11 11:12:58 +02:00
Pierre Noël
9e75d59e15 Fix some E2E tests 2021-08-11 10:05:20 +02:00
Alexandre Bodin
5b5434c001 Fix CI and some tests 2021-08-06 18:46:30 +02:00
Alexandre Bodin
189c819a1e Drop foreign keys before dropping tables 2021-08-06 11:19:17 +02:00
Alexandre Bodin
89fee54582 Merge branch 'v4/backend' into v4/database 2021-07-30 09:50:40 +02:00
Alexandre Bodin
81dd94c6ec Refactor all query() calls 2021-07-08 18:15:32 +02:00
Alexandre Bodin
09f7269b4a Implement compos in the entity service 2021-07-06 14:18:03 +02:00
Alexandre Bodin
e973804399 Filters working 2021-07-05 18:35:16 +02:00
Alexandre Bodin
3711ca3072 wip 2021-07-02 02:26:14 +02:00
Alexandre Bodin
2d59716f5d Cleanup CTB 2021-06-30 22:52:12 +02:00
Alexandre Bodin
b4ecb48c44 Remove mongoose connector 2021-06-29 16:27:35 +02:00
Alexandre Bodin
5e46f2999e Remove connection 2021-06-24 09:09:29 +02:00
soupette
c1cb6d1d0d Fix lint
Signed-off-by: soupette <cyril.lpz@gmail.com>
2021-06-23 20:18:13 +02:00
Alexandre Bodin
ab3760bb66 Rename import & requires, fix tests 2021-04-29 13:51:12 +02:00
Alexandre Bodin
e45f6df0b9 Move plugins & cleanup configs 2021-04-29 11:11:46 +02:00
Pierre Noël
24e1d979a7 update tests 2021-02-02 11:30:24 +01:00
Pierre Noël
291aeb07bc add read/create/update route for locales 2021-01-29 10:12:34 +01:00
Alexandre Bodin
fd6771315d add i18n plugin to testApp 2021-01-28 11:31:10 +01:00
Kim, Harim
ac3d10006c
Add session option to Strapi query for Mongo Multi-Document transaction (#6447)
* add session option to mongo queries for transaction

Signed-off-by: harimkims <harimkims@gmail.com>

* seperate session parameter in buildQuery functions

Signed-off-by: harimkims <harimkims@gmail.com>

* clarify comment about mongoose create requirement

Signed-off-by: harimkims <harimkims@gmail.com>

Co-authored-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-13 10:37:23 +01:00
Convly
28b5ed87f2 Remove node/no-extraneous comment 2021-01-08 10:09:11 +01:00
Convly
b9edf6ba56 Take pr review into account 2021-01-08 10:09:10 +01:00
Convly
579e4c32e9 Reworked the test builder 2021-01-08 10:09:10 +01:00