plane/web/helpers/user.helper.ts
2024-03-19 20:08:35 +05:30

15 lines
383 B
TypeScript

import { EUserWorkspaceRoles } from "@/constants/workspace";
export const getUserRole = (role: EUserWorkspaceRoles) => {
switch (role) {
case EUserWorkspaceRoles.GUEST:
return "GUEST";
case EUserWorkspaceRoles.VIEWER:
return "VIEWER";
case EUserWorkspaceRoles.MEMBER:
return "MEMBER";
case EUserWorkspaceRoles.ADMIN:
return "ADMIN";
}
};