Refactor WorkspaceMemberDto transpilation (#12110)
# Introduction In a nutshell this PR introduces a `workspaceMemberEntity` to `workspaceMemberDto` transpilation which was not done but commented as `// TODO` across the `user resolver`. Also passed on the `Roles` and `UserWorkspacePermissions` transpilation We now also compute the roles for the `workspaceMember` resolver ( not only the `workspaceMembers` ) Some refactor In the following days about to create a PR that introduces integration testing on the user resolver ## Conclusion As always any suggestions are more than welcomed ! Please let me know ! ## Misc Following https://github.com/twentyhq/twenty/pull/11914 closing https://github.com/twentyhq/core-team-issues/issues/1011
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
export type ObjectRecordsPermissions = {
|
||||
[objectMetadataId: string]: {
|
||||
type ObjectMetadataId = string;
|
||||
export type ObjectRecordsPermissions = Record<ObjectMetadataId, {
|
||||
canRead: boolean;
|
||||
canUpdate: boolean;
|
||||
canSoftDelete: boolean;
|
||||
canDestroy: boolean;
|
||||
};
|
||||
};
|
||||
}>;
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import { ObjectRecordsPermissions } from '@/types';
|
||||
import { ObjectRecordsPermissions } from "@/types/ObjectRecordsPermissions";
|
||||
|
||||
export type ObjectRecordsPermissionsByRoleId = {
|
||||
[roleId: string]: ObjectRecordsPermissions;
|
||||
};
|
||||
type RoleId = string;
|
||||
export type ObjectRecordsPermissionsByRoleId = Record<
|
||||
RoleId,
|
||||
ObjectRecordsPermissions
|
||||
>;
|
||||
|
||||
Reference in New Issue
Block a user