0
我想這個代碼添加到應用程序的配置,我從這個link得到它。yii2應用程序配置位置路徑
return [
'modules' => [
'admin' => [
'class' => 'mdm\admin\Module',
...
]
...
],
...
'components' => [
...
'authManager' => [
'class' => 'yii\rbac\PhpManager', // or use 'yii\rbac\DbManager'
]
],
'as access' => [
'class' => 'mdm\admin\components\AccessControl',
'allowActions' => [
'site/*',
'admin/*',
'some-controller/some-action',
// The actions listed here will be allowed to everyone including guests.
// So, 'admin/*' should not appear here in the production, of course.
// But in the earlier stages of your development, you may probably want to
// add a lot of actions here until you finally completed setting up rbac,
// otherwise you may not even take a first step.
]
],];
但是,該文件位於哪裏? 我正在使用Yii2高級模板。
哈哈,再次感謝:)添加所有的配置設置,你有沒有用yii2中的雙列表框? – Blackjack
不,我還沒有使用它..你可以發佈你的單獨問題..都準備在這裏幫助.. –
很高興聽到:DI希望你可以解決這個錯誤,就像另一個問題:D,這是[鏈接](http://stackoverflow.com/questions/40674952/error-when-trying-to-load-dual-listbox-in-yii2):) – Blackjack