qiang,我用yiic生成了一个table的脚手架,却发现accessControl Filter不起作用,请帮忙看一下
controller 部分代码:
public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
);
}
public function accessRules()
{
return array(
array('allow', // allow all users to perform 'list' and 'show' actions
'actions'=>array(),
'users'=>array('*'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('list','show','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('*'),
),
);
}
按配置,list应该是只有登录用户才可以访问,但事实上guest同样可以访问,甚至admin级别的action,guest也可以访问
不知道问题出在哪?
我用的是1.0.8版