320 Commits

Author SHA1 Message Date
Convly
16ab717fb2 Merge branch 'releases/v4' of github.com:strapi/strapi into v4/new-sanitize-fixes 2021-11-08 15:53:58 +01:00
Convly
8d4f8ddd57 Simplify & abstract common sanitize logic 2021-11-08 15:52:42 +01:00
vincentbpro
afe446843e fix: negative limit and pageSize handling (graphql) 2021-11-08 12:30:34 +01:00
Alexandre Bodin
42b87679bb Refactor policies to have a consistent factory API like middlewares 2021-11-08 09:33:36 +01:00
Pierre Noël
c6a5a047d6 Merge branch 'releases/v4' into v4/error-handling 2021-11-05 10:40:11 +01:00
Convly
7c560e3b94 Move the eventHub sanitize logic to the eventHub declaration 2021-11-05 10:36:10 +01:00
Pierre Noël
db1cb3040c refactor error-handling PR 2021-11-05 10:13:43 +01:00
Convly
5de071a92e Fix typo 2021-11-04 16:51:40 +01:00
Convly
d6516116b2 Move pipeAsync to @strapi/utils 2021-11-04 16:43:27 +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
cb098ec280 clean yup validations 2021-11-04 11:42:45 +01:00
Pierre Noël
ebb124de4b change graphql error handling with originalError 2021-11-04 11:42:44 +01:00
Pierre Noël
70c98f7ed9 fix error handling in entity-service 2021-11-04 11:42:43 +01:00
Pierre Noël
b4c9ad0440 refacto graphql errors 2021-11-04 11:42:43 +01:00
Pierre Noël
b58274aecb refactor error handling 2021-11-04 11:41:29 +01:00
Alexandre Bodin
a33d9e56be Move admin config to config/admin.js 2021-10-26 12:12:02 +02:00
Alexandre Bodin
577e5d8997 Fix push middleware order 2021-10-22 12:01:00 +02:00
Alexandre Bodin
9dd2824824 Init very simple filters system for the query layer to implement publication state filtering 2021-10-13 14:06:16 +02:00
Alexandre Bodin
edbad96c2c Remove old query params and remove _where occurences 2021-10-11 21:05:23 +02:00
Alexandre Bodin
c1c6dd4c11 Harmonize registries and simplify listing commands 2021-10-07 13:06:40 +02:00
Alexandre Bodin
c1aa57f436 Harmonize and make policies and middlwares more consistent 2021-10-05 10:43:24 +02:00
fdel-car
6b48af8a23 Ensure command consistencies & use __dirname in local configs 2021-10-01 16:43:46 +02:00
fdel-car
5ec3b43ef7 Update configs in packages & set rootDir in base configs 2021-09-30 15:03:29 +02:00
ivanThePleasant
ee757b3276 Created base configs for front testing and unit testing, cleaned up repo root jest configs and introduced projects, added unit and front jest configs for core packages and plugins 2021-09-30 15:01:06 +02:00
Alexandre Bodin
f55276cc73 Merge branch 'releases/v4' into v4/ds-migration 2021-09-28 18:21:21 +02:00
Convly
10be2a5e65 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-27 17:19:22 +02:00
Pierre Noël
491a662692 clean some code 2021-09-27 12:28:17 +02:00
Pierre Noël
b5e2ddfc3b add count feature inside populate field of content-api 2021-09-27 11:08:48 +02:00
Pierre Noël
0f123ceb39 fix RBAC 2021-09-27 11:08:48 +02:00
Convly
ef3650f073 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-27 10:33:31 +02:00
Alexandre Bodin
4eabcc57c0 Update @strapi/utils dependencies 2021-09-27 08:30:10 +02:00
Alexandre Bodin
c9f1cc6977 Fix sanitze-entity components missing 2021-09-27 08:29:15 +02:00
Alexandre Bodin
c1369c7960 Fix sanitizeEntity 2021-09-24 18:52:49 +02:00
Dieter Stinglhamber
3c1dcbe76d refactor policy API 2021-09-24 09:35:25 +02:00
Convly
033d3274d2 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-23 10:05:31 +02:00
Alexandre Bodin
c5f9d16105 Rename creator fields 2021-09-22 17:06:16 +02:00
Alexandre Bodin
fe85273301 Move published_at to publishedAt in frontend 2021-09-22 17:06:15 +02:00
Alexandre Bodin
58e024d3ad use columnName snake casing and rename timestamp attributes 2021-09-22 17:05:30 +02:00
Convly
8b139ec162 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-22 10:48:29 +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
Convly
7059686635 Fix pagination (ensureMaxValues) 2021-09-07 16:49:55 +02:00
Convly
cb8322c798 Fix pagination (ensureMaxValues) 2021-09-07 16:49:20 +02:00
Jean-Sébastien Herbaux
2b715a6ee9
V4/graphql configuration (#10896)
* Use a scalar to register the i18n locale arg

* Remove useless files & comments

* Use custom config for apollo server & the pagination (better handling of pagination)

* Fix missing strapi variable being transmitted to wrapResolvers/parseMiddlewares

* PR review comments
2021-09-07 11:23:49 +02:00
Convly
e2be869d3b Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-07 11:22:43 +02:00
Alexandre Bodin
23f7cdb7fa Fix typos 2021-09-01 21:13:23 +02:00
Convly
e76e7462b7 Merge branch 'releases/v4' into v4/graphql-schema-generation-refactor 2021-09-01 14:10:10 +02:00
Jean-Sébastien Herbaux
357fd163b0
V4/graphql customization (#10850)
* Add basic implementation for the graphql extension service

* Add createPolicyContext in @strapi/utils

* policiesMiddleware implementation for graphql

* wrapResolvers first implementation (authentication, middlewares, policies)

* move the content API schema build from /generators to /content-api. Extract types' register functions into a dedicated folder

* fix schema generation on bootstrap

* update the graphql service file to match new services arch

* fix single type queries

* simplify entity's resolver

* use apollo graphql conventions for resolver's args naming

* use the graphql extension system in i18n to add a locale arg to localized queries & mutations
2021-09-01 12:06:51 +02:00
Alexandre Bodin
7eaa8ae95e Handle sort query param 2021-08-31 19:31:31 +02:00
Alexandre Bodin
df6b7eca1a Implement fields convert query params 2021-08-31 19:31:30 +02:00
Alexandre Bodin
d6dabb6b02 Support booleans for nested populates 2021-08-31 19:31:30 +02:00