* Turned off Login as it is not working
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
@page "/admin/UsersManager"
|
||||
|
||||
@attribute [Authorize]
|
||||
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using OrdersManagementDataModel.Dtos
|
||||
@@ -136,19 +134,19 @@
|
||||
if (firstRender)
|
||||
{
|
||||
Visibility = false;
|
||||
ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
|
||||
|
||||
if (currentUser.Identity?.IsAuthenticated == false || currentUser.Identity?.Name != "pkus")
|
||||
{
|
||||
NavigationManager.NavigateTo("/Unauthorized");
|
||||
}
|
||||
else
|
||||
{
|
||||
// ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
|
||||
//
|
||||
// if (currentUser.Identity?.IsAuthenticated == false || currentUser.Identity?.Name != "pkus")
|
||||
// {
|
||||
// NavigationManager.NavigateTo("/Unauthorized");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
await LoadUsers();
|
||||
await LoadRoles();
|
||||
//await LoadFunctions();
|
||||
StateHasChanged();
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user