阅读背景:

在调用之前确定控制器操作是否已获得授权

来源:互联网 

The problem I'm trying to solve seems very simple to me: My application has a site-wide menu from which the user can navigate to various areas. The menu items are simply links to ActionResult methods. I'm using a custom AuthorizeAttribute on the actions to enforce the user's authorization roles. That works fine, in that it prevents the user from executing the action if they don't have the appropriate roles. What I want to do, though, is not even show the menu option to navigate to that action if they aren't authorized to perform it.The problem I'm trying to solve seems very simp




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: