Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Area-global filters in MVC 3

Since it doesn't appear to be supported natively, what's the recommended way of implementing global filters on a per-area basis?

like image 410
Richard Szalay Avatar asked Apr 18 '11 08:04

Richard Szalay


1 Answers

The reason it's not supported natively is because we want to discourage developers from doing it. Areas are not associated with controllers; they're associated with routes. We wanted to discourage developers from trying to apply authorization or other security-sensitive filters to areas since they can be bypassed.

See How can we set authorization for a whole area in ASP.NET MVC? for more information.

like image 186
Levi Avatar answered Sep 20 '22 19:09

Levi