[permissions] Enforce object-records permission checks in resolvers (#10304)
Closes https://github.com/twentyhq/core-team-issues/issues/393 - enforcing object-records permission checks in resolvers for now. we will move the logic to a lower level asap - add integration tests that will still be useful when we have moved the logic - introduce guest seeded role to test limited permissions on object-records
This commit is contained in:
@ -109,7 +109,7 @@ export class UserRoleService {
|
||||
}: {
|
||||
userWorkspaceIds: string[];
|
||||
workspaceId: string;
|
||||
}): Promise<Map<string, RoleDTO[]>> {
|
||||
}): Promise<Map<string, RoleEntity[]>> {
|
||||
if (!userWorkspaceIds.length) {
|
||||
return new Map();
|
||||
}
|
||||
@ -128,7 +128,7 @@ export class UserRoleService {
|
||||
return new Map();
|
||||
}
|
||||
|
||||
const rolesMap = new Map<string, RoleDTO[]>();
|
||||
const rolesMap = new Map<string, RoleEntity[]>();
|
||||
|
||||
for (const userWorkspaceId of userWorkspaceIds) {
|
||||
const userWorkspaceRolesOfUserWorkspace = allUserWorkspaceRoles.filter(
|
||||
|
||||
Reference in New Issue
Block a user