36 Commits

Author SHA1 Message Date
Marc-Roig
28ebe15abe add published at attribute to be filterable and sortable 2023-03-16 17:18:29 +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
Alexandre Bodin
e0e2084422 Move RBAC into CE 2023-03-06 21:46:45 +01:00
Fernando Chavez
ab54a49736 Edit in permission events' name and in roles emitting 2022-12-21 14:31:43 +01:00
Fernando Chavez
e4a9fd95f3 Creating new events for the permissions and handle them on the service level 2022-12-21 13:12:22 +01:00
Simone Taeggi
e1a0ae803e Merge branch 'main' into features/api-token-v2 2022-09-08 22:16:55 +02:00
Alexandre Bodin
4e989321e3 Fix eslint core/admin 2022-09-05 16:15:21 +02:00
Ben Irvin
b2b1432322 Merge branch 'features/api-token-v2' into api-token-v2/permissions-for-api-token 2022-08-18 12:20:45 +02:00
Bassel Kanso
baad6fd93f Merge branch 'main' into features/api-token-v2 2022-08-18 12:18:09 +03:00
Ben Irvin
88c243243d make error message unique 2022-08-16 10:18:41 +02:00
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Convly
31ef51e245 Update wording 2022-08-01 10:48:01 +02:00
Convly
43e360a641 Fix format permission handler argument 2022-07-28 17:05:29 +02:00
Convly
456f945d1e Fix condition checks 2022-07-22 10:43:06 +02:00
Convly
ddb6a91503 Make RBAC an implementation of the @strapi/permissions engine 2022-07-21 10:41:40 +02:00
Convly
7f6d194905 Use schema.config.attributes instead schema.attributes 2022-05-02 14:41:24 +02:00
Convly
1d50038e44 Remove hidden fields from the admin API responses 2022-04-26 10:39:50 +02:00
Demian Caldelas
69ce8b5287
Fix sanity check for @casl/ability upgrade #12232 (#12265)
* Fix sanity checks for @casl/ability upgrade

* Add comments for previous commit

* Fix sanity checks for @casl/ability upgrade #12232
2022-01-26 09:55:17 +01:00
harimkims
31259dbf4a Remove unnecessary bracket in the end 2022-01-17 14:13:33 +01:00
Kim, Harim
9e8655716d Refactor code
Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu>
2022-01-17 14:13:33 +01:00
harimkims
de69873606 Fix that returns an empty object when the admin user value is null
Signed-off-by: harimkims <harimkims@gmail.com>
2022-01-17 14:13:33 +01:00
harimkims
2ff2ba860e Fix hasMany admin users making app crash
Signed-off-by: harimkims <harimkims@gmail.com>
2022-01-17 14:13:33 +01:00
Dieter Stinglhamber
ba25b7b651 remove unallowed fields from admin::user relations 2021-11-24 15:15:23 +01:00
Convly
25e62db93a use 'sanitizers' instead of 'utils' 2021-11-10 17:08:54 +01:00
Convly
8d4f8ddd57 Simplify & abstract common sanitize logic 2021-11-08 15:52:42 +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
491a662692 clean some code 2021-09-27 12:28:17 +02:00
Pierre Noël
0f123ceb39 fix RBAC 2021-09-27 11:08:48 +02:00
Pierre Noël
d02c7ab741 Use new filters format in the upload plugin 2021-09-27 11:08:47 +02:00
Alexandre Bodin
3784cc5b5e Implement rest api populate syntax and Init refactor convert query params for v4 2021-08-31 19:31:29 +02:00
Alexandre Bodin
47c3900c07 Update createContentType to expose a simpler object 2021-08-23 22:25:31 +02:00
Pierre Noël
682e877644 Merge branch 'v4/backend' into pluginAPI/loadPlugin 2021-08-18 18:37:57 +02:00
Alexandre Bodin
d5dd34278b Fix delete permissions 2021-08-17 13:48:52 +02:00
Pierre Noël
dd0c095f1e Merge branch 'v4/backend' into pluginAPI/loadPlugin 2021-08-04 15:05:56 +02:00
Alexandre Bodin
d44a6f68ee Migrate admin to programmatic loading 2021-08-02 17:54:49 +02:00