I looking into building authentication in my ASP.NET application with the following requirements.
- A user has exactly one Role (i.e. Admin, SalesManager, Sales, ....)
- A role has a set of permissions to CRUD access a subset of existing objects. I.e. "Sales has CREAD, READ, WRITE permission on object type "Products" but not DELETE"
- Somehow I like the permissions to be in a hierarchy with inheritance so that I for i.e. Admin don't need to specify all available objects.
- The system must quickly be able to answer the question "Does user X have permission to do Y to object Z"
- All database managed (MSSQL), implemented in C#/ASP.NET
I lite to get feedback on these requirements? Ideas how to implement this using as much as possible of the ASP.NET framework? (but I'm also interested in how this can be achieved without Memberships)