ant-design-pro-blazor icon indicating copy to clipboard operation
ant-design-pro-blazor copied to clipboard

How the menu implements <AuthorizeView>

Open smallprogram opened this issue 3 years ago • 1 comments

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

smallprogram avatar Feb 26 '22 19:02 smallprogram

Temporarily inject AuthenticationState to solve this problem, I hope Ant Blazor Pro can have an official solution

smallprogram avatar Feb 27 '22 04:02 smallprogram