Files
twenty/packages/twenty-server/test/integration/graphql/utils/delete-one-role.util.ts
Marie 264861e020 [permissions V2] Add integration tests on relations and objectRecord permissions (#12450)
In this PR

1. adding tests on relations and nested relations to make sure that if
any permission is missing, the query fails
2. adding tests on objectRecord permissions to make sure that
permissions granted or restricted by objectPermissions take precedence
on the role's allObjectRecords permissions
2025-06-10 16:38:38 +02:00

11 lines
379 B
TypeScript

import { deleteOneRoleOperationFactory } from 'test/integration/graphql/utils/delete-one-role-operation-factory.util';
export const deleteRole = async (client: any, roleId: string) => {
const deleteRoleQuery = deleteOneRoleOperationFactory(roleId);
await client
.post('/graphql')
.set('Authorization', `Bearer ${ADMIN_ACCESS_TOKEN}`)
.send(deleteRoleQuery);
};