
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 13s
- 重构AppMainStruct、AssignmentQuestion、Question等实体模型 - 更新相关DTO以匹配新的数据结构 - 优化前端页面布局和组件 - 添加全局信息和笔记功能相关代码 - 更新数据库迁移和程序配置
20 lines
496 B
Plaintext
20 lines
496 B
Plaintext
@page "/"
|
|
@using Microsoft.AspNetCore.Authorization
|
|
@using TechHelper.Client.Pages.Common.Exam
|
|
|
|
<AuthorizeView Roles="Student">
|
|
<Authorized>
|
|
<TechHelper.Client.Pages.Student.HomePage />
|
|
</Authorized>
|
|
</AuthorizeView>
|
|
|
|
@code {
|
|
[CascadingParameter]
|
|
private Task<AuthenticationState> authenticationStateTask { get; set; }
|
|
|
|
protected override Task OnInitializedAsync()
|
|
{
|
|
return base.OnInitializedAsync();
|
|
Console.WriteLine(authenticationStateTask.Result.User.IsInRole("Student"));
|
|
}
|
|
} |