Yii2 reported an error in controller verification authority

  mysql, question

Rbac permissions can be verified normally but an exception is thrown when the controller inside verifies
The code of the controller inside is as follows

public function beforeAction($action) {

$controller = Yii::$app->controller->id;  //Get controller
 $action = Yii::$app->controller->action->id;  //obtaining method
 return true;
 Thrownw New \ Yii \ Web \ UnautohorizedhtpException ('You do not have permission');

When you get to the page, you will be prompted that you do not have permission to operate. The database inside has added the corresponding data of $controller.’_’.$action ………..

Data inside writes real addresses such as: