php - Permission management of ci framework, newbie, help
伊谢尔伦
伊谢尔伦 2017-06-21 10:11:14
0
1
953

Newbie, I don’t know the permission control idea of ​​ci framework, I hope you can give me some guidance!

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
我想大声告诉你

Permission management, usually using RBAC (Role-Based Access Control) mode.
R: role represents role, which mainly groups various permissions, such as administrator, editor, auditor, etc.
Specific ideas:
For each module of the program, you can consider each Controller or even refine the function of each controller. Give these modules a name, record it in the database, and mark it in the program.
Then associate this module with the role and record it in a table. For example, editing, the possible operating modules are writing articles, editing articles, etc.
Finally, associate the user with the role.
In this way, when a user wants to perform a certain operation (when accessing an action), the role of the current user can be read out. Then go to the role module corresponding table based on the role information to see if there is a record of the current operation module. If so, it means there is authorization.
The above is the basic idea, not only CI, but other frameworks can also be used

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template