Security trimming and custom AuthorizeAttribute

Sep 10, 2010 at 4:11 PM
Edited Sep 10, 2010 at 4:29 PM


When I use MyAuthorizeAttribute to decorate MVC controller method, the security trimming doesn't work.

It seems that AuthorizeAttributeAclModule.cs look for type AuthorizeAttribute instead of classes implemented IAuthorizeAttribute.

Is it possible to change code to look for classes implemented IAuthorizeAttribute interface ?



Sep 10, 2010 at 4:29 PM


I understand why we have to create a subclass from AuthorizeAttribute...

because, subclassedAttribute call AuthorizeCore() and not OnAuthorization()


Sep 21, 2010 at 3:16 PM

Also, make sure you have not sealed your custom attribute class.