"C #" RBAC Permission framework
I. Noun interpretation
1. User: Login account, and role hook, can have multiple roles
2. Role: The role that the account belongs to, and the permission hook, can have multiple permissions
3. Permissions: Role-owned operations rights, sub-licenses and prohibitions
The permissions that are not available in the license list are inaccessible, and the permissions in the Forbidden list are not accessible, where the priority is higher than the license
Forbidden role: If you need to prohibit a user of a permission, if you modify the role of the Permissions association, the role associated with the user rights will be changed, this is not possible. You can disable this
Two. Design
1. Database design: User single table, role single table, privilege list, user-Role association table, role-Permission Association table
2. Program Design: User and login account, privileges and functions in the program, role plays the role of linked accounts and functions
"C #" RBAC Permission framework