From 10ebd49859e1406d5eaef8acb8a5e42daac2f348 Mon Sep 17 00:00:00 2001 From: andrey Date: Thu, 12 Aug 2021 14:00:23 +0300 Subject: [PATCH] reports access --- .../modules/reports/controllers/ReportsController.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/modules/reports/controllers/ReportsController.php b/backend/modules/reports/controllers/ReportsController.php index bb93ac4..741d549 100644 --- a/backend/modules/reports/controllers/ReportsController.php +++ b/backend/modules/reports/controllers/ReportsController.php @@ -7,6 +7,7 @@ use common\classes\Debug; use Yii; use common\models\Reports; use backend\modules\reports\models\ReportsSearch; +use yii\filters\AccessControl; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; @@ -28,6 +29,15 @@ class ReportsController extends Controller 'delete' => ['POST'], ], ], + 'access' => [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'allow' => true, + 'roles' => ['admin'], + ], + ], + ], ]; }