How to Extend/Architect the ASP.NET MVC 3 Authorize Attribute to Handle This Scenario

纵然是瞬间 提交于 2019-12-03 12:58:28

I had somewhat similar problem and I did not use Authorize attribute.

Instead I decided to extend Controller class and override the implementation of OnActionExecuting. In my implementation then I could perform all checks like to which department user belonged and whether he is good enough to see the data of other departments. See if this approach works for you.

I had somewhat similar problem and I did not use Authorize attribute.

Instead I decided to to take the different -2 Layout for the Different user .

if the User is Admin then he will go to the different view and if the user is guest he will go to the different view through different layout.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!