согласно монтажу нужно убедится в отсудствие компоненов authManager который настроится при установки и добавить в modules 'rbac' => 'dektrium\rbac\RbacConsoleModule',но после этого выдаёт ошибку HTTP ERROR 500 ,
а если закоментировать не работают три кнопоки http://joxi.ru/D2PGJDBibbOKm3
при нажатии выдают Not Found (#404)
при добавлении самостоятельно
'authManager' => [
'class' => 'yii\componets\rbac\DbManager',
],
не находит класс -Class yii\componets\rbac\DbManager does not exist
Запутался уже окончательно, кто знает помогите разобраться.
вот конфиг:
Код: Выделить всё
<?php
$params = require(__DIR__ . '/params.php');
$config = [
'id' => 'basic',
'basePath' => dirname(__DIR__),
'language' => 'ru-RU',
'bootstrap' => ['log'],
'components' => [
'authManager' => [
'class' => 'yii\componets\rbac\DbManager',
],
'authClientCollection' => [
'class' => \yii\authclient\Collection::className(),
'clients' => [
// here is the list of clients you want to use
// you can read more in the "Available clients" section
],
],
'github' => [
'class' => 'dektrium\user\clients\GitHub',
'clientId' => '?',
'clientSecret' => '?',
],
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => 'KHY87ughP2MZ_BAi321KfDHFk5ule34ty',
],
'jdate' => [
'class' => 'jDate\DateTime'
],
'cache' => [
'class' => 'yii\caching\FileCache',
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.yandex.ru',
'username' => '',
'password' => '',
'port' => '587',
'encryption' => 'tls',
],
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'urlManager' => [
'class' => 'yii\web\UrlManager',
// Disable index.php .
'showScriptName' => true,
// Disable r= routes
'enablePrettyUrl' => true,
'rules' => array(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
],
'db' => require(__DIR__ . '/db.php'),
],
'modules' => [
'user' => [
'class' => 'dektrium\user\Module',
'enableUnconfirmedLogin' => true,//boolean
'confirmWithin' => 21600,//integer
'cost' => 12, //integer
'admins' => ['admin']//array
],
// 'rbac' => 'dektrium\rbac\RbacWebModule',
],
'params' => $params,
];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
}
return $config;