I am using the yii2 Role Based Access Control System (RBAC). I defined roles and permissions, certain rules, assigned roles to users. Everything is working fine.
but I want to update the assigned roles to users. For instance:
Yii::$app->authManager->assign('admin', '11');
Here I made user id 11 admin. Now I want to update and change. I want to make this user manager.
When I try:
Yii::$app->authManager->assign('manager', '11');
This user has an administrator + manager. I just want to upgrade this user admin role to admin.
How can i do this?
source share