public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'actions' => ['index'],
'roles' => ['?'],
],
[
'allow' => true,
'roles' => ['@'],
],
],
],
];
}