I read a couple of articles mentioning that you're supposed to have all of your controllers derive from a parent class with the [Authorize] attribute to not leave security holes in your site. (Example: article)
However, all controllers already derive from the parent Controller, which doesn't have the [Authorize] attribute. What is the best way to enforce this suggestion without having to add the attribute to every single controller?
[Authorize]on each controller and decorate it with the specific roles that will have access. This extends to methods as well. For example, if I have a controller with[Authorize(Roles="Administrator,Role1")]I might have a method within the controller that is set to[Authorize(Roles="Administrator")].