ant-design-pro-blazor
ant-design-pro-blazor copied to clipboard
How the menu implements <AuthorizeView>
Using the original Blazor template, authorization authentication can be implemented as follows
<AuthorizeView Roles="admin">
<li class="nav-item px-3">
<NavLink class="nav-link" href="mobilesurvey">
<i class="navicon bi bi-eye-fill" aria-hidden="true"></i> test
</NavLink>
</li>
</AuthorizeView>
But the menu of AntBlaozr Pro uses the MenuData of AntDesign.ProLayout.BasicLayout to set the menu, and I don't know how to achieve authorization authentication
Temporarily inject AuthenticationState to solve this problem, I hope Ant Blazor Pro can have an official solution