We're considering making the move from WebForms to MVC for our (quite substantial) intranet application.
The intranet app currently uses Windows authentication. Authorization to particular folders is controlled by web.config files inside each folder. The app also uses a Menu control which picks all this up and only shows users menu links to pages they are authorised to view. All this functionality comes out of the box with WebForms.
In terms of the conversion to MVC, I think that replacing this functionality is going to be one of the key challenges.
Can anyone tell me what tools are available in MVC to:
- restrict users' access to certain pages / views whatever based on their Active Directory group membership
- generate markup for a menu which is aware of the users' authorisation to certain pages / views
That would be mighty helpful.
Decorating the controller action with the
[Authorize]
attribute.Depending on your exact requirements you could build a custom HTML helper. You may also take a look at MVCContrib MenuBuilder.