Yii2 has support for Access Control. They are:
They are best explained in documentation . But in summary:
AccessControl
, you will use a project that:
- does not have many controllers / actions;
- There will not 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 define in each controller which actions each role * can perform.
The DbManager class (which uses the RBAC concept) creates the tables where all this information will be stored of what permission or role * each user has.
If this idea of going into each controler and making changes is not feasible for your project, I'd recommend taking a look at in this library .
*: name given to the role / profession / position you assign to users, eg administrator, editor, etc.