我正在 YII 中建立一个站点。我为我的一个控制器制作了一项功能,例如删除。我已经定义了这样的访问规则。
public function accessRules()
{
return array(
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('index', 'create', 'delete', 'update'),
'users'=>array('*'),
),
array('deny',
'users' => array('*'),
),
);
}
仍然如果我在登录后尝试访问删除功能,它会给我这个错误。
CHttpException
You are not authorized to perform this action. (C:\xampp\htdocs\framework\web\auth\CAccessControlFilter.php:170)
谁能告诉我我在这里做错了什么?