Yii2 has Access Control support. They are:
They are best explained in documentation. But in short:
AccessControl
, you will use in a project that:
- does not have many controllers/actions;
- there won’t be many permissions changes for users and roles* are well defined;
- will not be created/edited very often.
This is because you will have to, in each controller, define which actions each role* can perform.
The Dbmanager class (which uses the concept RBAC), creates the tables where will be stored all this information of what permission or role* each user has.
If this idea of going into each controller and making the changes is not feasible for your project, I would recommend taking a look in that library.
*: name given to the role/profession/position you assign to users, ex: administrator, editor, etc
Interesting I’m studying more about RBAC, thank you!
– IvanFloripa