In our project management application, we need to keep access rights (per project for each user) in a separate table in db. IE.
User A can create tasks in Project #1, User A can only read task in Project #2
To succeed that, we extend our AspNetUserRoles table by adding a new coloumn(projectID).
By default, in razor view, we can check user roles with User.IsInRole("CanCreateTask")
. We need to extend this method and want to check the user role for specific project Ie. User.IsInRole("CanCreateTask", project.Id)
EDITED: Also i need to check user access in controller with project.Id
[Authorize(Roles = "CanCreateTask")]
Did some research on net but could not find any solution.