1. Assign the user a userid, associate the user and role in the User Role table, correspond the roles and permissions in the Role Permissions table, and the permissions table stores the name of the menu bar on the left.
2. When judging a permission, the user's userid is taken to obtain its role ID, and then the current access function is determined to be the corresponding permission.
Data sheet:
1. User tables
2. Character table
3. Permissions table
4. User Role Table
5. Role Permissions Table
Implementation of the MVC development model:
1) User authentication: User login, first through the login page to achieve interactive interface, transfer requests (including user accounts, passwords, etc.) and receive responses, and then struts according to the configuration file (Struts-config.xml) Delegate the request received by Actionservlet to the appropriate action handler. In the business layer, the spring IOC container that manages the serviced component is responsible for providing the business model component to the action and the component's collaboration Object data Processing (DAO) component to complete the business logic, which is user authentication, which, if validated, enters the system.
2) Permission verification: When the user is operating on the system, the user's ID is verified according to the authorization, and the corresponding menu list is displayed by verification.
Activity 08, "MVC Implements user rights"