I have an ASP.NET MVC 3 site with an admin panel (not all of us? :) - I used my own solution for a very reliable login system.
Now, on each view in the administrator controller, I need to check that the user is registered and has proper authorization, so every time I run the same verification and authorization methods on each view separately.
How can I do the same checks for all requests to a specific controller? (I mean, all checks are checked only once and in one place)
(I would also like to have an exception, so I could allow the user to use the login page of the administrator controller and beyond)
Thanks!
Roman
source share