using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace CSR.WebUI.Pages
{
    [Authorize(Policy = "UserOrAdmin")]
    public class UserPageModel : PageModel
    {
        public string Username { get; set; } = string.Empty;
        public void OnGet()
        {
            Username = User.Identity?.Name ?? "Unknown";
        }
    }
}