Files
electric-cherry/src/lib/auth.ts
T

23 lines
540 B
TypeScript

export type UserRole = 'admin' | 'operator' | 'viewer';
/** Reserved identity for work requested by the controller. */
export const systemUsername = 'Maxis';
export interface AuthUser {
id: string;
username: string;
displayName: string;
role: UserRole;
disabled: boolean;
mustChangePassword: boolean;
createdAt: string;
updatedAt: string;
lastLoginAt: string | null;
}
export const roleLabels: Record<UserRole, string> = {
admin: 'Administrator',
operator: 'Operator',
viewer: 'Viewer'
};