384 Commits

Author SHA1 Message Date
Ben Irvin
dc90c752c8 remove old path 2022-08-31 10:57:13 +02:00
Ben Irvin
1e5f8e9fee fix test 2022-08-31 10:56:59 +02:00
Jean-Sébastien Herbaux
b9538ea7c3
Merge pull request #14247 from strapi/api-token-v2/throw-on-unknown-permission
Validate & throw on unknown permissions for API tokens
2022-08-31 10:34:32 +02:00
Convly
dc084f9102 Add missing await 2022-08-30 10:56:17 +02:00
Jean-Sébastien Herbaux
bd9ddaa84c
Merge pull request #14248 from strapi/api-token-v2/db-auto-sync-and-cleanup
Automatically synchronize and cleanup API tokens' permissions in database
2022-08-30 10:54:46 +02:00
Convly
bf5534d725 Test consistency 2022-08-29 18:03:43 +02:00
Convly
dfad26d2a2 Fix test 2022-08-29 18:03:04 +02:00
Convly
e4b9dd5ab8 Simplify the delete request 2022-08-29 17:39:41 +02:00
Convly
a80e83d397 Remove console.log 2022-08-29 17:36:22 +02:00
Convly
f506369ce6 Sync permissions in DB with existing one, automatic cleanup on schema deletion 2022-08-29 17:32:41 +02:00
Convly
e7ca50f6b9 Validate permissions for api-tokens & throw on unknown permissions 2022-08-29 16:33:41 +02:00
Ben Irvin
3cd1a9b183
Merge branch 'features/api-token-v2' into api-token-v2/restrict-lifespans 2022-08-29 12:37:53 +02:00
Ben Irvin
0213ee2e1a
Merge pull request #14238 from strapi/api-token-v2/rename-api-token-permission
rename token-permission to api-token-permission
2022-08-29 12:35:21 +02:00
Ben Irvin
b4c8cae41d
Merge pull request #14234 from strapi/api-token-v2/allow-empty-permissions-array
allow empty array of permissions
2022-08-29 12:34:57 +02:00
Simone
4f7db2ef72
Merge pull request #14180 from strapi/api-token-v2/settings-access-api-token
RBAC on API tokens settings access
2022-08-29 11:30:26 +02:00
Ben Irvin
2dea049a8c fix test 2022-08-29 10:50:46 +02:00
Ben Irvin
7ed24a9edf
Merge pull request #14192 from strapi/api-token-v2/regenerate-tokens-api
Api Token v2/add regenerate controller tests
2022-08-29 10:38:42 +02:00
Ben Irvin
9aed7d9540 rename token-permission to api-token-permission 2022-08-29 09:17:31 +02:00
Ben Irvin
697662421f allow empty array of permissions 2022-08-26 16:11:08 +02:00
Ben Irvin
16537f199e validate lifespan 2022-08-26 15:27:47 +02:00
Jean-Sébastien Herbaux
d3357b87af
Merge pull request #14216 from strapi/api-token-v2/fix-update-custom-token-permissions
Fix permissions update for custom API tokens
2022-08-26 15:24:06 +02:00
Bassel Kanso
025c4d154f
Merge pull request #14200 from strapi/api-token-v2/permissions-route
Api token layout route
2022-08-26 12:44:12 +03:00
Ben Irvin
14c183ce51 validate lifespan 2022-08-26 10:33:18 +02:00
Bassel Kanso
db4c3af1f9 remove test 2022-08-26 10:42:01 +03:00
Bassel Kanso
3ce256e279 add content api permissions controller to it's separate file 2022-08-26 10:02:13 +03:00
Convly
29cea1d7cb null guard for expiration checks 2022-08-25 16:56:50 +02:00
Convly
d834bf6f48 Fix tests 2022-08-25 16:27:18 +02:00
Bassel Kanso
4d72da1257 Merge branch 'features/api-token-v2' into api-token-v2/permissions-route 2022-08-25 16:59:12 +03:00
Bassel Kanso
a772f8a8ac add content type permissions to the permissions route 2022-08-25 16:57:45 +03:00
Convly
87520328bd Fix expiration date checks on api token strategy 2022-08-25 15:44:10 +02:00
Convly
3568034cb4 Add test for create & update custom token permissions 2022-08-25 15:16:53 +02:00
Convly
8732d07555 Prevent duplicate permissions on create too 2022-08-25 14:25:09 +02:00
Convly
2c71d7d069 Fix permissions update for custom token (uniqueness) 2022-08-25 14:23:36 +02:00
Jean-Sébastien Herbaux
4c6c5e5218
Merge pull request #14214 from strapi/api-token-v2/fix-update-checks
Fix API tokens' update due to wrong enum values
2022-08-25 14:12:46 +02:00
Convly
46b28db877 Fix invalid enum value used to assert 'changingTypeToCustom' 2022-08-25 13:56:24 +02:00
Ben Irvin
9e42345011 yup blocks unexpected fields 2022-08-25 12:01:52 +02:00
Simone Taeggi
cce909d1ae add the access action to the e2e tests 2022-08-25 10:00:52 +02:00
Simone Taeggi
3017fd5e41 update e2e test 2022-08-25 08:52:42 +02:00
Ben Irvin
2195e9a2f2 fix comment 2022-08-24 19:05:13 +02:00
Ben Irvin
3ca863d80b fix failing test 2022-08-24 19:02:38 +02:00
Ben Irvin
2b30007f86 lifespan must be greater than zero 2022-08-24 18:05:51 +02:00
Ben Irvin
2359ca1cc6 fix tests 2022-08-24 18:05:36 +02:00
Ben Irvin
53be3b5d30 make name unique 2022-08-24 18:04:12 +02:00
Bassel Kanso
e8bca67186 create route for api token layout 2022-08-24 18:08:17 +03:00
Ben Irvin
6577a9533c use lodash/fp 2022-08-24 16:29:39 +02:00
Ben Irvin
574448deae remove comments 2022-08-24 16:27:48 +02:00
Ben Irvin
a3a584d176 allow lifespan to update 2022-08-24 16:27:15 +02:00
Ben Irvin
1bd9fbdd85 fix return type 2022-08-24 16:26:40 +02:00
Ben Irvin
568892af97 add controller tests 2022-08-24 13:01:29 +02:00
Ben Irvin
589a5bd1cf fix test timing 2022-08-24 12:37:21 +02:00