update nach Schuelererfassung
This commit is contained in:
36
BlazorApp - Kopie (4)/Pages/Admin/ListBase.cs
Normal file
36
BlazorApp - Kopie (4)/Pages/Admin/ListBase.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using System.Net;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace BlazorApp.Pages.Admin
|
||||
{
|
||||
public class ListBase : ComponentBase
|
||||
{
|
||||
[CascadingParameter]
|
||||
public Task<AuthenticationState> authenticationStateTask { get; set; }
|
||||
|
||||
[Inject]
|
||||
public NavigationManager NavigationManager { get; set; }
|
||||
|
||||
|
||||
protected async override Task OnInitializedAsync()
|
||||
{
|
||||
|
||||
var authenticationState = await authenticationStateTask;
|
||||
|
||||
//if (!authenticationState.User.Identity.IsAuthenticated)
|
||||
//{
|
||||
// NavigationManager.NavigateTo($"/identity/account/login");
|
||||
// // string returnUrl = WebUtility.UrlEncode($"/");
|
||||
// // NavigationManager.NavigateTo(WebUtility.UrlEncode("/identity/Account/Login"));
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user