Home > PHP Framework > ThinkPHP > body text

Introduction to AUTH permission management in THINKPHP

Release: 2020-05-25 09:12:56
forward
3939 people have browsed it

Introduction to AUTH permission management in THINKPHP

The principle of AUTH permission management

The four simplest data tables of auth permission management are as follows

Introduction to AUTH permission management in THINKPHP

Each function corresponds to a url path. The rule table actually records the url path and implements permission management through the url

Classification of permission verification timing

Pre-verification

The so-called pre-authentication means that the permissions of the currently accessible internal elements of the page are verified before they are displayed. For example: when visitors visit a web page, they cannot see a certain function menu, but administrators can see it, etc. The user experience of pre-verification is good, but the performance is poor

Post-authentication

The so-called post-authentication is simple, that is, the permissions are verified first when accessing each function . For example, click the 'Add Column' button on the page, verify it first, and then execute the add column function code after passing it. Post-verification user experience is poor, but performance is good

Permission verification code implementation location

After the user successfully logs in to the backend, all menu, navigation, and button operations in the backend will be Permission verification is required

But the backend home page, welcome page, user exit and other functions do not require permission verification, which can be customized according to specific project requirements

The difference between AUTH permission management and RBAC permission management

Similar points: both are role-based permission management

Differences: The design of the data table is different, resulting in more flexible AUTH and more delicate permission management

Permission module design

Introduction to AUTH permission management in THINKPHP

Recommended tutorial: "TP5"

The above is the detailed content of Introduction to AUTH permission management in THINKPHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!