using moduleExamen.Models;

namespace moduleExamen.Helpers;

public static class SessionManager
{
    public static User? CurrentUser { get; set; }
    public static string RoleName => CurrentUser?.IdRoleNavigation?.Name ?? "Гость";
    public static bool IsGuest => CurrentUser == null;
    public static bool IsAdmin => RoleName == "Админ";
    public static bool IsManager => RoleName == "Менеджер";
    public static bool IsManagerOrAdmin => IsAdmin || IsManager;
}
