* Turned off Login as it is not working
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
@page "/ScheduleOrder/{ScheduleOrderId:int}"
|
||||
@attribute [Authorize]
|
||||
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@@ -128,14 +127,14 @@
|
||||
{
|
||||
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
|
||||
// {
|
||||
ScheduleOrderDto = await ScheduleOrderService.GetScheduleOrderAsync(ScheduleOrderId);
|
||||
|
||||
_scheduleOrderDetails = ScheduleOrderDto?.ScheduleOrderDetails;
|
||||
@@ -149,7 +148,7 @@
|
||||
scheduleOrderDetailDto.RecipientName = ScheduleOrderDto?.RecipientName;
|
||||
scheduleOrderDetailDto.PurchaserName = ScheduleOrderDto?.PurchaserCode;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user