Files
gridpilot.gg/apps/website/lib/display-objects/UserRoleDisplay.ts
Marc Mintel 18133aef4c
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 5m42s
Contract Testing / contract-snapshot (pull_request) Has been skipped
view data fixes
2026-01-22 23:40:38 +01:00

20 lines
367 B
TypeScript

/**
* UserRoleDisplay
*
* Deterministic mapping of user role codes to display labels.
*/
export class UserRoleDisplay {
/**
* Maps user role to display label.
*/
static roleLabel(role: string): string {
const map: Record<string, string> = {
owner: 'Owner',
admin: 'Admin',
user: 'User',
};
return map[role] || role;
}
}