Closed ipppinto closed 9 years ago
The problem is that I create the rbac folder with files
what content of file '@app/rbac/items.php';
This is the problem. I don't have nothing.
When I removed custom items, assignment and ruleFile paths from config, removed rbac directory and re-added configs but access right data creation put into own rbacController console command which I run, containig createRole, add, createPermission commands. Mine files got filled and in the end from code
mkdir(Yii::getAlias("@app/rbac"));
$auth = Yii::$app->authManager;
$admin = $auth->createRole('admin');
$auth->add($admin);
$viewOwnRequest = $auth->createPermission('viewOwnRequest');
$auth->add($viewOwnRequest);
$auth->addChild($admin, $viewOwnRequest);
resulted in
return [
'admin' => [
'type' => 1,
'children' => [
'viewOwnRequest',
],
],
'viewOwnRequest' => [
'type' => 2,
],
];
Hi,
I have this error and I don't know why (different of issue #86)
in /var/www/vhosts/vps101842.ovh.net/cmcintranet.ippinto.ovh/vendor/yiisoft/yii2/rbac/PhpManager.php at line 641
Thank you