I have the following structure in my DB:
DomainEntities: +EntityID +Name +ParentID +... Users: +UserID +Username +... Roles: +RoleID +Name UserRolesAssociation: +RoleID +UserID +EntityID
So i want to use MVC’s built in authorization attribute to filter action in my controllers that are made by different members.
I what to be able to say if user1 makes a delete action on entity1 or any entity under it i can see if he has the right role to do that and filter the action accordingly.
What would be the best practice to tackle that topic ?
Should i create my own permissions engine that will provide me the answers i need or can i use the existing capabilities ?
A custom
[Authorize]seems like a good place to implement this logic.and then: