mirror of
https://github.com/strapi/strapi.git
synced 2025-09-01 12:53:03 +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'),
|
id: nonNull('ID'),
|
||||||
},
|
},
|
||||||
|
|
||||||
description: 'Update an existing user',
|
description: 'Delete an existing user',
|
||||||
|
|
||||||
async resolve(parent, args, context) {
|
async resolve(parent, args, context) {
|
||||||
const { koaContext } = context;
|
const { koaContext } = context;
|
||||||
|
@ -26,12 +26,12 @@ module.exports = ({ strapi }) => {
|
|||||||
|
|
||||||
// Scoped auth for replaced CRUD operations
|
// Scoped auth for replaced CRUD operations
|
||||||
// Role
|
// Role
|
||||||
[`Mutation.${createRole}`]: { auth: { scope: [`${roleUID}.create`] } },
|
[`Mutation.${createRole}`]: { auth: { scope: [`${roleUID}.createRole`] } },
|
||||||
[`Mutation.${updateRole}`]: { auth: { scope: [`${roleUID}.update`] } },
|
[`Mutation.${updateRole}`]: { auth: { scope: [`${roleUID}.updateRole`] } },
|
||||||
[`Mutation.${deleteRole}`]: { auth: { scope: [`${roleUID}.delete`] } },
|
[`Mutation.${deleteRole}`]: { auth: { scope: [`${roleUID}.deleteRole`] } },
|
||||||
// User
|
// User
|
||||||
[`Mutation.${createUser}`]: { auth: { scope: [`${userUID}.create`] } },
|
[`Mutation.${createUser}`]: { auth: { scope: [`${userUID}.create`] } },
|
||||||
[`Mutation.${updateUser}`]: { auth: { scope: [`${userUID}.update`] } },
|
[`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