Browse Source

feat: improve ws role to project role map

pull/6378/head
mertmit 1 year ago
parent
commit
d91a0d508e
  1. 8
      packages/nocodb-sdk/src/lib/enums.ts

8
packages/nocodb-sdk/src/lib/enums.ts

@ -194,6 +194,14 @@ export const RoleColors = {
[OrgUserRoles.VIEWER]: 'yellow', [OrgUserRoles.VIEWER]: 'yellow',
}; };
export const WorkspaceRolesToProjectRoles = {
[WorkspaceUserRoles.OWNER]: ProjectRoles.OWNER,
[WorkspaceUserRoles.CREATOR]: ProjectRoles.CREATOR,
[WorkspaceUserRoles.EDITOR]: ProjectRoles.EDITOR,
[WorkspaceUserRoles.COMMENTER]: ProjectRoles.COMMENTER,
[WorkspaceUserRoles.VIEWER]: ProjectRoles.VIEWER,
};
export const OrderedWorkspaceRoles = [ export const OrderedWorkspaceRoles = [
WorkspaceUserRoles.OWNER, WorkspaceUserRoles.OWNER,
WorkspaceUserRoles.CREATOR, WorkspaceUserRoles.CREATOR,

Loading…
Cancel
Save