Files
NTBug/web/Helpdesk.Web/Auth/UserRoles.cs
T

23 lines
811 B
C#
Raw Normal View History

namespace Helpdesk.Web.Auth;
/// <summary>Kódy rolí z API (claim <c>role</c>) a jejich české názvy pro rozhraní.</summary>
public static class UserRoles
{
public const string Student = "STUDENT";
public const string Teacher = "TEACHER";
public const string FacilityManager = "FACILITY_MANAGER";
public const string Management = "MANAGEMENT";
public const string Admin = "ADMIN";
2026-12-04 16:49:05 +01:00
public static IReadOnlyList<string> All { get; } = [Student, Teacher, FacilityManager, Management, Admin];
public static string DisplayName(string? role) => role switch
{
Student => "Student",
Teacher => "Vyučující",
FacilityManager => "Správce budov",
Management => "Vedení školy",
Admin => "Administrátor",
_ => "Uživatel",
};
}