rbac error - unknown role name

Related to:


I followed the steps exactly on here (I’m using same RbacController with admin & author roles):


So after running yii rbac/init console command, it has generated folder: public_html/console/rbac folder with ‘assignments.php’ and ‘items.php’ files inside.

But I think these files need to be used by both my backend and frontend (common folder) systems (not just console, where I generated them).

How to enable this? (can we add these steps to the guide docs please?)

Do the files need to be copied to common folders? is there something in config of authManager missing/needed?

// in SignupForm model:

if ($user->save()) {

            // authManager

            $auth = Yii::$app->authManager;

            $authorRole = $auth->getRole('author');

            $auth->assign($authorRole, $user->getId());


            return $user;


I suspect that is what the problem is (my frontend system is not picking up the items.php & assignments.php files), from the error I get (attachment).

Help much appreciated, thank you