In the guide there is a section
http://www.yiiframework.com/doc/guide/1.1/en/topics.auth#access-control-filter
The controllers criteria catch my attention…
How to use it ? http://www.yiiframework.com/doc/api/1.1/CAccessRule#controllers-detail
Where to use it ?
I tried inside a controller, adding controllers => array(‘nameOfController’)
it acts like actions =>array()
it just deny all or allow all etc.
not that useful…
But if I had a way to use it from a module or something…
Or it is meant to work as some base rules from Controller ?
public function filters()
{
return array(
'accessControl',
);
}
public function accessRules()
{
return array(
array('allow',
'controllers'=>array('default'),
'roles'=>array('admin'),
),
array('deny',
'controllers'=>array('default'),
'users'=>array('*'),
),
);
}