95 Commits

Author SHA1 Message Date
Josh
9a537e811b chore: merge fixes
chore: fix lint
2023-06-22 09:18:57 +01:00
Marc
674dc96b89 refactor: mark uid as a prohibited field & separate auto-clone route (#16957)
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
2023-06-22 08:12:20 +01:00
Josh
f72a62be05 fix: error message improvements (#16949) 2023-06-22 08:12:12 +01:00
Marc-Roig
ec434498d1 fix: excludeNotCreatableFields 2023-06-22 08:12:11 +01:00
Marc-Roig
3720a7fa8c feat: sanitize excludeNotCreatableFields 2023-06-22 08:11:59 +01:00
Marc-Roig
616c2283a5 fix: prohibited fields error message 2023-06-22 08:11:11 +01:00
Marc-Roig
e6b1b53db9 refactor: move clone utils to controller 2023-06-22 07:59:49 +01:00
Marc-Roig
06bb305691 feat: admin clone controller 2023-06-22 07:59:49 +01:00
Marc-Roig
7ad44c8699
Merge branch 'main' into fix/rbac-condition-and-relations 2023-06-09 10:32:42 +02:00
Convly
106cfafca4 Merge branch 'main' into releases/4.11.0 2023-06-07 11:31:42 +02:00
Jamie Howard
59d61424a9 chore: fix entity manager linter warnings 2023-06-01 15:21:47 +01:00
Marc-Roig
74023ce419
todo: revert create if custom condition does not allow it 2023-05-29 15:42:36 +02:00
Marc-Roig
31afc24ee5
fix: unit tests 2023-05-26 17:57:23 +02:00
Marc-Roig
9a7bef24bf
chore: PR proposed changes 2023-05-26 17:26:55 +02:00
Marc
832b4aa46d
Update packages/core/content-manager/server/controllers/collection-types.js
Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu>
2023-05-26 16:11:33 +02:00
Marc-Roig
00b166d439
fix: single types unit test 2023-05-26 14:45:22 +02:00
Marc-Roig
ee5d821fa7
chore: cleanup comments 2023-05-26 13:05:08 +02:00
Marc-Roig
f41e29c40b
feat: populate in relations and single types 2023-05-26 12:34:18 +02:00
Marc-Roig
a9efdd0771
feature: populate from query 2023-05-26 12:34:00 +02:00
Marc-Roig
7c0a562948
feat: use populate builder 2023-05-25 17:00:52 +02:00
Marc-Roig
cdb17d5c16
chore: rename populate query 2023-05-24 18:20:06 +02:00
Marc-Roig
4a97be49b5
chore: cleanup get query populate 2023-05-24 18:04:50 +02:00
Mark Kaylor
f2e769cd69 Refactor to check permissions on entities before passing to updateMany 2023-05-04 10:38:09 +02:00
Mark Kaylor
119b88a1b1 Add bulk publish and unpublish 2023-05-03 12:17:26 +02:00
Convly
db90d338a5 tmp 2023-04-28 15:11:42 +02:00
Rémi de Juvigny
f57ddb4cef Merge /content-types and /components into /init route 2023-04-13 19:35:15 +02:00
Rémi de Juvigny
ce467fdf4e Add all types to fieldSize service 2023-04-13 18:53:30 +02:00
Rémi de Juvigny
660349845d Add content-manager/init endpoint 2023-04-13 11:52:40 +02:00
Alexandre Bodin
18fbe664d7 Fix tests 2023-03-15 19:08:49 +01: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
ivanThePleasant
2af669c961 Merge branch 'main' into chore/user-level-data 2022-11-23 09:35:16 +02:00
Pierre Noël
3245c4b466 add validation tests on findAvailable and findExisting relations 2022-10-17 15:41:35 +02:00
Pierre Noël
d4b8c00a5c use data format for xToOne relations in findExisting 2022-10-13 14:42:53 +02:00
Pierre Noël
be5e6ebc05 Merge branch 'feature/relations-main-view' into relations-main-view/refactor-find-existing-find-available 2022-10-11 12:38:04 +02:00
Pierre Noël
241393eaa3 implement new findAvailable route 2022-10-10 14:42:23 +02:00
Pierre Noël
1200e43618 update tests using findExisting relations 2022-10-10 14:42:22 +02:00
Pierre Noël
3aa26deb1f implement new findExisting route 2022-10-10 14:42:19 +02:00
Pierre Noël
8f73a1d761 use data format + init e2e tests 2022-10-10 14:28:56 +02:00
Pierre Noël
212d80f4fa Update singletype controller
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
2022-10-10 14:28:55 +02:00
Pierre Noël
0415f5d677 add getNumberOfDraftRelations route 2022-10-10 14:28:54 +02:00
Pierre Noël
98e8bc61e0 use transformLoadParamsToQuery instead of transformParamsToQuery to fix ordering being ignored in loadPages() 2022-10-07 18:49:15 +02:00
Pierre Noël
5021f99392 add and use utils isXtoX 2022-10-03 18:54:13 +02:00
Pierre Noël
9409b3a5e6 Remove idsToOmit + comment 2022-10-03 18:11:33 +02:00
Pierre Noël
a17b3a0ba2 add and use loadPages 2022-10-03 17:52:12 +02:00
Pierre Noël
0f7852d8d8 use query().load() to get existing relations 2022-10-03 11:12:22 +02:00
Pierre Noël
da0f17be75 add idsToInclude 2022-09-30 15:38:49 +02:00
ivanThePleasant
01bb760793 Clean up unnecessary code 2022-09-29 14:15:07 +03:00
ivanThePleasant
5a4362faf7 Refactor changes to use request context 2022-09-29 11:24:11 +03:00
Julie Plantey
c407c20d05 fix xtoOne + conditions to enbale fetch + count label 2022-09-22 14:01:56 +02:00
Pierre Noël
ea35195ea1 fix no relations return for find available when no relations are set 2022-09-08 11:10:57 +02:00