HY我想明白了什麼叫最好梅索德使用和如何,如果有一個簡單的爲例,因爲我不能指定whitch ROL給予巫婆personne基於角色的訪問控制訪問控制列表或警予
public function accessRules()
{
return array(
array('allow', // allow authenticated to perform 'index' and 'view' actions
'actions'=>array('index','view'),
'users'=>array('@'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete'),
'users'=>array('admin'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}
你檢查的文件? http://www.yiiframework.com/doc/guide/1.1/en/topics.auth#access-control-filter – Asped 2014-09-29 11:39:18
是的,但我不明白:/ – 2014-09-29 11:48:18
欲瞭解更多信息:http://stackoverflow.com/questions/ 26051939 /正確的密碼不接受在yii登錄/ 26052542#26052542 – 2014-10-01 06:01:43