Merge pull request #12454 from iicdii/fix/unable-to-delete-user

Fix not working deleteUsersPermissionsUser and mutations related to role
This commit is contained in:
Jean-Sébastien Herbaux 2022-05-16 11:08:56 +02:00 committed by GitHub
commit 2765a8d9c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ module.exports = ({ nexus, strapi }) => {
id: nonNull('ID'),
},
description: 'Update an existing user',
description: 'Delete an existing user',
async resolve(parent, args, context) {
const { koaContext } = context;

View File

@ -26,12 +26,12 @@ module.exports = ({ strapi }) => {
// Scoped auth for replaced CRUD operations
// Role
[`Mutation.${createRole}`]: { auth: { scope: [`${roleUID}.create`] } },
[`Mutation.${updateRole}`]: { auth: { scope: [`${roleUID}.update`] } },
[`Mutation.${deleteRole}`]: { auth: { scope: [`${roleUID}.delete`] } },
[`Mutation.${createRole}`]: { auth: { scope: [`${roleUID}.createRole`] } },
[`Mutation.${updateRole}`]: { auth: { scope: [`${roleUID}.updateRole`] } },
[`Mutation.${deleteRole}`]: { auth: { scope: [`${roleUID}.deleteRole`] } },
// User
[`Mutation.${createUser}`]: { auth: { scope: [`${userUID}.create`] } },
[`Mutation.${updateUser}`]: { auth: { scope: [`${userUID}.update`] } },
[`Mutation.${deleteUser}`]: { auth: { scope: [`${userUID}.delete`] } },
[`Mutation.${deleteUser}`]: { auth: { scope: [`${userUID}.destroy`] } },
};
};