From 0bd39a9af3bb28dc4e8a559ded70c91fd6c3afe7 Mon Sep 17 00:00:00 2001 From: stes Date: Mon, 7 Aug 2017 12:38:57 +0300 Subject: [PATCH] access control --- controllers/VariantCountController.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+), 0 deletions(-) diff --git a/controllers/VariantCountController.php b/controllers/VariantCountController.php index 9775b84..3e94d4a 100644 --- a/controllers/VariantCountController.php +++ b/controllers/VariantCountController.php @@ -12,6 +12,7 @@ use artbox\catalog\models\Variant; use yii\web\Response; use PHPExcel_IOFactory; + use yii\filters\AccessControl; /** @@ -35,6 +36,22 @@ 'delete' => [ 'POST' ], ], ], + 'access' => [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'actions' => [ + 'login', + 'error', + ], + 'allow' => true, + ], + [ + 'allow' => true, + 'roles' => [ '@' ], + ], + ], + ], ]; } -- libgit2 0.21.4