public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'ruleConfig' => ['class' => AccessRules::className()], 'rules' => [['actions' => ['index'], 'allow' => true, 'roles' => ['admin']]]]];
 }
Ejemplo n.º 2
0
 public function behaviors()
 {
     return ['access' => ['class' => AccessControl::className(), 'only' => ['profile', 'edit'], 'ruleConfig' => ['class' => AccessRules::className()], 'rules' => [['actions' => ['profile', 'edit'], 'allow' => true, 'roles' => ['@']]]]];
 }