Пример #1
0
 /**
  * @return bool
  * @throws \yii\web\ForbiddenHttpException
  */
 public function beforeRun()
 {
     if ($this->needAuthorize && Yii::$app->user->isGuest) {
         HttpError::the403();
     }
     return parent::beforeRun();
 }