Note: The difference between rbac0 and rbac1 lies in permission inheritance. For the permission Design of rbac1, please follow the author's subsequent csdn blog.
1. the user table stores system user information, such as Michael Jacob and Michael Lee. The fields can include ID, name, fullname, email, phone ,......
2. The role table stores role information, such as student and administrator. The fields include ID, name ,......
3. The permission table stores the system permission information. It defines which modules of the system are made public, or when the access is allowed. The field has the ID and permission name.
4. the user role table is associated with the relationship between the user and the role, for example, Zhang San-student and Li Si-administrator. The fields include ID, user ID, and role ID. The user knows the role to which the user belongs.
5. the user permission table is used to grant permissions to users separately. Field Information: ID, user ID, and permission ID
6. Field Information of the overall menu information of the menu table: menu ID, menu FID, menu name, and menu code (used for sorting menus of the same level and same directory ), menu type (0-directory 1-module), remarks, target location
7. The role menu table is used to associate roles with menus and permissions. Field Information: ID, menu ID, menu FID, role ID, permission ID
Basic Ideas:
User-role Association
Associate roles with menus and permissions
Remark: different from the previous blog version, it associates roles with menus and permissions. The role permission table and permission menu table are canceled and replaced with a role menu table.
A general permission design list based on rbac0