Based on JeecgBoot, how to realize button permission control? Detailed method and configuration process

JeecgBoot low-code development framework, based on code generators, quickly develop enterprise information application systems.

 

Open source project: The code is hosted on Github and Gitee, and domestic users use Gitee to download faster.

System environment: Win10 /Ubuntu , JDK8, maven , node , docker.

Dependent services: Docker, MySQL8, Redis5

 image.png

 

1. Demand

Develop expense management functions and add workflows according to customer needs. Approval authority is one of the steps of the workflow, and the authority control needs to be independent of the entire workflow, that is, button level control.

 image.png

 

Two, JeecgBoot implementation plan

1. Configure menu permissions

Log in to the background management system as an administrator, and then enter: System Management -> Menu Management, first configure the menu items of the corresponding page, and then choose to add a lower-level menu.

 image.png

 

2. Add button permissions

Enter the name and authorization ID in turn, and other options are default. Note down the authorization ID, which will be used later.

 image.png

 

3. Authorization role

System Management -> Role Management, select the corresponding role, enter the authorization management page, and check the menu and button permissions.

 image.png

 

3. Application permission logic in the merchant backend page

After completing the permission configuration, the development of the background Vue page is very simple and convenient. You only need to add the v-has instruction to reference the authorization ID declared when configuring permissions.

 image.png

 

==

Lingjia Technology is a start-up Internet technology company that develops and operates Xiaolingfeng's odd labor platform and cultural and creative industrial park.

 

As a start-up company, we are well aware of the importance of talents. If you have an uneasy heart and passion and dreams are surging in your heart, then, come on, join Lingjia Technology, we will be passionate and experience the ups and downs together, let us Work together to create the future glory!

 

Senior technical positions are now open, architecture, middleware, distributed, microservices, risk control, data security, do you want to share your own views and experiences? Welcome to chat.

 

write the code,

Write the code,

Write code that complies with software engineering specifications.


Guess you like

Origin blog.51cto.com/13851865/2575050