1.4 Release
Date: August, 16, 2016
- Added
allowActions
property to AccessControl filter
Usage:
// When filter attaches globally
'as access' => [
'class' => yii2mod\rbac\filters\AccessControl::class,
'allowActions' => [
'site/*',
'admin/*',
// The actions listed here will be allowed to everyone including guests.
// So, 'admin/*' should not appear here in the production, of course.
// But in the earlier stages of your development, you may probably want to
// add a lot of actions here until you finally completed setting up rbac,
// otherwise you may not even take a first step.
]
],
// When filter attaches via `behaviors` in the controller
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'allowActions' => ['contact', 'about-us'], // list of controller actions
],
}