17 lines
459 B
TypeScript
17 lines
459 B
TypeScript
|
|
/** Matches cookie `urie` / profile `userRoleId`. */
|
||
|
|
export const USER_ROLE_ADMIN = "1";
|
||
|
|
export const USER_ROLE_APPROVER = "2";
|
||
|
|
export const USER_ROLE_CONTRIBUTOR = "3";
|
||
|
|
|
||
|
|
export function isApproverOrAdmin(
|
||
|
|
roleId: string | undefined | null,
|
||
|
|
): boolean {
|
||
|
|
return roleId === USER_ROLE_ADMIN || roleId === USER_ROLE_APPROVER;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function isContributorRole(
|
||
|
|
roleId: string | undefined | null,
|
||
|
|
): boolean {
|
||
|
|
return roleId === USER_ROLE_CONTRIBUTOR;
|
||
|
|
}
|