* Turned off Login as it is not working
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
@page "/EdiCustomerOrder/{CustomerOrderId:guid}"
|
||||
|
||||
@attribute [Authorize]
|
||||
|
||||
@inject EdiCustomerOrderService EdiCustomerOrderService
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject CustomAuthenticationStateProvider CustomAuthenticationStateProvider
|
||||
@@ -197,19 +195,20 @@
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
|
||||
|
||||
if (currentUser.Identity?.IsAuthenticated == false)
|
||||
{
|
||||
NavigationManager.NavigateTo("/Unauthorized");
|
||||
}
|
||||
else
|
||||
{
|
||||
// ClaimsPrincipal currentUser = CustomAuthenticationStateProvider.GetCurrentUser();
|
||||
//
|
||||
// if (currentUser.Identity?.IsAuthenticated == false)
|
||||
// {
|
||||
// NavigationManager.NavigateTo("/Unauthorized");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
EdiCustomerOrderDto? ediCustomerOrder = await EdiCustomerOrderService.GetEdiCustomerOrderAsync(CustomerOrderId);
|
||||
|
||||
EdiCustomerOrderDto = ediCustomerOrder;
|
||||
_ediCustomerOrderLines = ediCustomerOrder?.EdiCustomerOrderLines.ToList() ?? [];
|
||||
}
|
||||
StateHasChanged();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user