2023-12-04 14:33:23 +00:00
|
|
|
import { EUserWorkspaceRoles } from "constants/workspace";
|
|
|
|
|
|
|
|
export const getUserRole = (role: EUserWorkspaceRoles) => {
|
2023-11-20 07:59:54 +00:00
|
|
|
switch (role) {
|
2023-12-04 14:33:23 +00:00
|
|
|
case EUserWorkspaceRoles.GUEST:
|
2023-11-20 07:59:54 +00:00
|
|
|
return "GUEST";
|
2023-12-04 14:33:23 +00:00
|
|
|
case EUserWorkspaceRoles.VIEWER:
|
2023-11-20 07:59:54 +00:00
|
|
|
return "VIEWER";
|
2023-12-04 14:33:23 +00:00
|
|
|
case EUserWorkspaceRoles.MEMBER:
|
2023-11-20 07:59:54 +00:00
|
|
|
return "MEMBER";
|
2023-12-04 14:33:23 +00:00
|
|
|
case EUserWorkspaceRoles.ADMIN:
|
2023-11-20 07:59:54 +00:00
|
|
|
return "ADMIN";
|
|
|
|
}
|
|
|
|
};
|