Open alreadyshow opened 6 years ago
i found it,it's config error. authManager should write at backend/config/main.php.
I have the same problem. Can you elaborate on what the error is and how to come around it?` @alreadyshow
i had same error , i had my authManager config in console/config/main.php then i added in backend , now its working file. you need to add this both console config - to run migration and in backend to run this extension
/opt/lampp/htdocs/yii2test/backend/config/main.php 'components' => [ 'authManager' => [ 'class' => 'yii\rbac\DbManager', // uncomment if you want to cache RBAC items hierarchy // 'cache' => 'cache', ], }
"mdmsoft/yii2-admin": "3.0"
/**
@return \yii\data\ActiveDataProvider|\yii\data\ArrayDataProvider / public function search($params) { / @var \yii\rbac\Manager $authManager */ $authManager = Configs::authManager(); if ($this->type == Item::TYPE_ROLE) { $items = $authManager->getRoles(); } else { $items = array_filter($authManager->getPermissions(), function($item) { return $this->type == Item::TYPE_PERMISSION xor strncmp($item->name, '/', 1) === 0; }); } $this->load($params); if ($this->validate()) {
}
can't get the function? is that a bug?