Checking login user role in razor page

前端 未结 3 1972
清酒与你
清酒与你 2020-12-13 05:54
@if (Request.IsAuthenticated && User.Identity.Name==\"administrator\")
{
     
3条回答
  •  不知归路
    2020-12-13 06:17

    @if (Request.IsAuthenticated && User.IsInRole("Administrators"))
    {
         
    }
    

提交回复
热议问题