When I started to develop a project, and all the requirements, database design, and page design were OK, I used to start with background development, at this time, we need a very practical and convenient permission control system. my choice is RBAC.
Role-Based Access Control refers to Role-Based Access Control. For more information, see The Baidu Encyclopedia entry RBAC.
DEMO usage
Configure a local virtual domain name pointing to the DEMO directory and set it in/application/config. php:
$ Config ['base _ url'] = 'http: // cif1_com '; // locally configured virtual domain name
Import the DEMO database, which will be downloaded later
Bytes.
Go to the background and have two menus: Operation set (which can be understood as Menu management) and role management.
Note: When assigning permissions to a role, the permissions corresponding to the main menu are not added. Therefore, if you do not have sub-menus (such as control panel), you need to add a non-displayed sub-menu.
Download DEMO
There are still many things to be improved. if you have any opinions, please do not hesitate to give us some advice.