11 lines
347 B
TypeScript
11 lines
347 B
TypeScript
export type AccountRole = "contributor" | "moderator" | "admin";
|
|
export type StaffRole = Exclude<AccountRole, "contributor">;
|
|
|
|
export function canReviewMaps(role: string | undefined): role is StaffRole {
|
|
return role === "moderator" || role === "admin";
|
|
}
|
|
|
|
export function isAdministrator(role: string | undefined) {
|
|
return role === "admin";
|
|
}
|