Пример #1
0
 public function actionAuth()
 {
     if (!Yii::$app->user->can("admin")) {
         throw new HttpException(403, 'You are not allowed to perform this action.');
     }
     $dataProvider = new ActiveDataProvider(['query' => AuthenticationLog::find()]);
     return $this->render('auth', ['dataProvider' => $dataProvider]);
 }