The reason as to why you want to write their own set of rights management system?
- Be configured to meet the requirements of the frame
- No interface operation and viewing
- Expect more detailed management
The company where the author, rights management system used in the project is not using SpringSecurity or SpringShiro this framework, the reason: both of the above three reasons, the most important point, these two frameworks for developers not very friendly, and therefore, permission to use their own development projects management. And it is the main developer of the rights management system, but due to the demand of the project permissions system, so learning a lesson Mu courses, in-depth understanding of the core rights management, increase the corresponding capacity.
First, the rights management project to be developed content
Functional Configuration Management
Permission to intercept Functional
Auxiliary Functional: buffer (Redis), various tree structures generated
Second, the functional components:
1, Configuration Management features:
- User permissions, role management interface (with extensions: department, authority module)
- Role - user management, role - authority management
- Permission to update log management
2, permission to intercept class features:
- In section (Filter) to intercept permission to do
- Determine whether the user has a permission
3, auxiliary class features:
- Cache (, Redi) packaging and use
- All kinds of trees: tree department, authority module tree, the tree role permissions, user rights trees
- Permissions recovery operation
Third, the detailed structural design table
Design specifications:
Each table has its own primary key;
It is defined as a possible field NOT NULL;
Try to add notes for each field;
Lowercase unified database fields, separated by an underscore between words;
Using the InnoDB storage engine;
You can use varchar fields do not use TEXT, BLOB type as far as possible;
UTF8 character set selection table
Detailed table structure design:
1, the department table
2, the user table
3, permissions module table
4, permissions table
5, the role of table
6, the role of the user associated table
7. Role - privileges associated table
8, the relevant authority to update records in the table
note:
datetime type only supports M ysql5.6.5 above version.
The following versions of the datetime into TIMESTAMP can be.