你好,我想了解最好的方法是什么,如果有一个简单的例子怎么办,因为我不能指定 whitch rol 给女巫的人
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('*'),
),
);
}