/**
  * @inheritdoc
  */
 public function behaviors()
 {
     $behaviors = parent::behaviors();
     $behaviors['access']['rules'][] = ['actions' => ['error'], 'allow' => true, 'roles' => ['?']];
     return $behaviors;
 }
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     $behaviors = parent::behaviors();
     $behaviors['access']['rules'][] = ['actions' => ['login', 'reset-password', 'request-password-reset'], 'allow' => true, 'roles' => ['?']];
     return $behaviors;
 }
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     $behaviors = ArrayHelper::merge(parent::behaviors(), ['access' => ['class' => AccessControl::className(), 'rules' => [['allow' => true, 'roles' => [User::ROLE_USER]]]]]);
     return $behaviors;
 }
Beispiel #4
0
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), ['access' => ['class' => AccessControl::className(), 'only' => ['logout'], 'rules' => [['actions' => ['logout'], 'allow' => true, 'roles' => ['@']]]]]);
 }