Create minimal app
This commit is contained in:
parent
6b87902ca7
commit
27aaee6293
17 changed files with 346 additions and 52 deletions
15
CSR.WebUI/Pages/User.cshtml.cs
Normal file
15
CSR.WebUI/Pages/User.cshtml.cs
Normal file
|
@ -0,0 +1,15 @@
|
|||
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";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue