20 lines
367 B
TypeScript
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;
|
|
}
|
|
}
|