开发者

Allow a controller method from a non-logged user

I have a controller where most every method should be restricted to Role=Admin so the class instantiates with:

[Authorize(Roles = Admin)]

Every method takes on this check. I know I can override this attribute method by method so as to开发者_开发百科 permit other user roles but I'd like to remove the Authorization check completely for one of the methods in this class.

What's the syntax for that?

thx


Wasn't able to implement Peter's suggested link so I removed the global attribute and added it back to each of the controller's methods except the one I wanted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜