How to manage role Assignment by action wise in MVC3, i.e. each role is assigned by a different Action in MVC3 in C#.net ?
Asked
Active
Viewed 151 times
1 Answers
1
If you want to restrict access to given actions you could decorate them with the [Authorize]
attribute and specify the roles that are allowed to access it:
[Authorize(Roles = "Admin")]
public ActionResult SomeAction()
{
...
}

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928