Activity 08, "MVC Implements user rights"

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.