Usage of User.IsInRole() in a View

后端 未结 2 910
鱼传尺愫
鱼传尺愫 2020-12-03 08:37

In my mvc5 project to disable an action link for unauthorized users i did like this

@if (User.IsInRole(\"Admin\") | User.IsInRole(\"Manager\"))
{ 
        @H         


        
2条回答
提交回复
热议问题