Commit 0bd39a9af3bb28dc4e8a559ded70c91fd6c3afe7

Authored by Anastasia
1 parent 576325f4

access control

Showing 1 changed file with 17 additions and 0 deletions   Show diff stats
controllers/VariantCountController.php
... ... @@ -12,6 +12,7 @@
12 12 use artbox\catalog\models\Variant;
13 13 use yii\web\Response;
14 14 use PHPExcel_IOFactory;
  15 + use yii\filters\AccessControl;
15 16  
16 17  
17 18 /**
... ... @@ -35,6 +36,22 @@
35 36 'delete' => [ 'POST' ],
36 37 ],
37 38 ],
  39 + 'access' => [
  40 + 'class' => AccessControl::className(),
  41 + 'rules' => [
  42 + [
  43 + 'actions' => [
  44 + 'login',
  45 + 'error',
  46 + ],
  47 + 'allow' => true,
  48 + ],
  49 + [
  50 + 'allow' => true,
  51 + 'roles' => [ '@' ],
  52 + ],
  53 + ],
  54 + ],
38 55 ];
39 56 }
40 57  
... ...