Implementing role-based authorization using .NET MVC 5
问题 I would like to implement a role-based authorization in my web application that I'm building. The way I imagined to make this is to create 3 tables in my DB like following: 1. Roles 2. UserRoles (many to many table) 3. Users After that each user would have a role assigned to him. Now... My question is, How do I permit or forbid access to specific views/controllers inside my .NET MVC application. I've stumbled upon this: [Authorize(Roles = "HrAdmin, CanEnterPayroll")] [HttpPost] public