If you want to protect assets (files, database rows, domain entities, documents, etc.) instead of application functions or user capabilities , role-based security does not work very well.
The best model is to use access control lists (ACLs), as you know from NTFS. You yourself said this because you need to assign specific permissions for each object to each user or role. This is what the ACL does.
If you need to protect objects that end up being strings in SQL Server, you will need to define custom tables for the ACL, because SQL Server does not support row-level permissions.
Based on the data in these ACLs, you must perform the necessary security checks on your data access components.
Here are some links to the relevant SO answers:
- Access control in ASP.NET MVC depending on input parameters / service level?
- What is the best mechanism for implementing granular security (i.e. authorization) in an ASP.NET MVC application?
- How to implement an invitation code to share a resource with another user?
Mark seemann
source share