yii-starter-kit / yii2-starter-kit

Yii2 Starter Kit
http://yii2-starter-kit.terentev.net
Other
1.42k stars 648 forks source link

create new roles and permissions - RBAC #711

Closed exploradatos closed 5 years ago

exploradatos commented 5 years ago

Hi, have a question about creating own permissions and roles, I try to add new ones but they don't work for , rather I realize that the on backend/config/web.php has default roles, I want to know if it is possible eliminate the default ones and create own.

rivieiraa commented 5 years ago

There are default roles indeed, but entrie project is only a template. Modify it to suit your needs.

Use RBAC migrations to manage roles. Documentation link

exploradatos commented 5 years ago

Then they can only be created by migration ./yii migrate/create init_rbac, not creating from here: image

rivieiraa commented 5 years ago

If you're on developing stage of project / need fixed roles then i recommend to stick to migrations. But if you develop project that involves creation of roles by administrator it may be better choice to create roles through UI.

exploradatos commented 5 years ago

Excellent, then I will start by modifying according to the RBAC manual. Thanks for dispelling the doubt.