views:

30

answers:

1

Slapping on [Authorize] attributes on Controllers and Actions to restrict access is awesome.

Is it possible to do the equivalent for an entire Area in MVC 2? Where I can restrict Area-wide access dependent on Roles/Users/whatever in a central place instead of littering them throughout all the Controllers?

+1  A: 

You could use a base controller decorated with this attribute that all your controllers in the area derive from.

Darin Dimitrov
*forehead slap* that'll surely do it! thanks!
kdawg