23 lines
540 B
Plaintext
23 lines
540 B
Plaintext
@page "/"
|
|
@using Microsoft.AspNetCore.Authorization
|
|
@using TechHelper.Client.Pages.Common.Exam
|
|
|
|
<AuthorizeView Roles="Student">
|
|
<Authorized>
|
|
<TechHelper.Client.Pages.Student.HomePage />
|
|
</Authorized>
|
|
</AuthorizeView>
|
|
|
|
|
|
<AssignmentInfoCard></AssignmentInfoCard>
|
|
|
|
@code {
|
|
[CascadingParameter]
|
|
private Task<AuthenticationState> authenticationStateTask { get; set; }
|
|
|
|
protected override Task OnInitializedAsync()
|
|
{
|
|
return base.OnInitializedAsync();
|
|
Console.WriteLine(authenticationStateTask.Result.User.IsInRole("Student"));
|
|
}
|
|
} |