mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 04:03:50 +00:00
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:
commit
2765a8d9c4
@ -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;
|
||||
|
@ -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`] } },
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user