mirror of
https://github.com/strapi/strapi.git
synced 2025-11-24 06:03:37 +00:00
Merge pull request #14214 from strapi/api-token-v2/fix-update-checks
Fix API tokens' update due to wrong enum values
This commit is contained in:
commit
4c6c5e5218
@ -335,8 +335,8 @@ const update = async (id, attributes) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changingTypeToCustom =
|
const changingTypeToCustom =
|
||||||
attributes.type === constants.API_TOKEN_TYPE.custom &&
|
attributes.type === constants.API_TOKEN_TYPE.CUSTOM &&
|
||||||
originalToken.type !== constants.API_TOKEN_TYPE.custom;
|
originalToken.type !== constants.API_TOKEN_TYPE.CUSTOM;
|
||||||
|
|
||||||
// if we're updating the permissions on any token type, or changing from non-custom to custom, ensure they're still valid
|
// if we're updating the permissions on any token type, or changing from non-custom to custom, ensure they're still valid
|
||||||
// if neither type nor permissions are changing, we don't need to validate again or else we can't allow partial update
|
// if neither type nor permissions are changing, we don't need to validate again or else we can't allow partial update
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user