web: založení projektu Helpdesk.Web a layout aplikace
ASP.NET Core MVC (.NET 10) s Bootstrapem 5, layout s menu podle role, chybové stránky, bezpečnostní hlavičky (CSP, Referrer-Policy) a česká kultura. Refs #19, #20
This commit is contained in:
1 parent
b402d9f92c
commit
abd075287c
25 files changed
+523
No files matched your search
@@ -0,0 +1,21 @@
|
||||
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";
|
||||
|
||||
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",
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user