private function addAccessRules()
    {
        $this->ruleUserSwitch['controllers'] = [$this->module->id . '/user'];

        $this->module->attachBehavior(
            'access_debug',
            [
                'class' => 'yii\filters\AccessControl',
                'only' => [$this->module->id . '/user', $this->module->id . '/default'],
                'user' => $this->userSwitch->getMainUser(),
                'rules' => [
                    $this->ruleUserSwitch,
                ],
            ]
        );
    }
private function addAccessRules()
    {
        $this->ruleUserSwitch['controllers'] = [$this->module->id . '/user'];

        $this->module->attachBehavior(
            'access_debug',
            [
                'class' => 'yii\filters\AccessControl',
                'only' => [$this->module->id . '/user', $this->module->id . '/default'],
                'user' => $this->userSwitch->getMainUser(),
                'rules' => [
                    $this->ruleUserSwitch,
                ],
            ]
        );
    }
private function addAccessRules ( ) { $ this -> ruleUserSwitch [ 'controllers' ] = [ $ this -> module -> id . '/user' ] ; $ this -> module -> attachBehavior ( 'access_debug' , [ 'class' => 'yii\filters\AccessControl' , 'only' => [ $ this -> module -> id . '/user' , $ this -> module -> id . '/default' ] , 'user' => $ this -> userSwitch -> getMainUser ( ) , 'rules' => [ $ this -> ruleUserSwitch , ] , ] ) ; }
Add ACF rule. AccessControl attach to debug module.
Access rule for main user.
@throws InvalidConfigException
Add ACF rule . AccessControl attach to debug module . Access rule for main user .