We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b32c75 commit 44e819aCopy full SHA for 44e819a
frontend/controllers/PostController.php
@@ -8,6 +8,7 @@
8
use yii\web\Controller;
9
use yii\web\NotFoundHttpException;
10
use yii\filters\VerbFilter;
11
+use yii\filters\AccessControl;
12
13
use common\models\Tag;
14
use common\models\Comment;
@@ -31,6 +32,26 @@ public function behaviors()
31
32
'delete' => ['POST'],
33
],
34
35
+
36
37
+ 'access' =>[
38
+ 'class' => AccessControl::className(),
39
+ 'rules' =>
40
+ [
41
42
+ 'actions' => ['index'],
43
+ 'allow' => true,
44
+ 'roles' => ['?'],
45
+ ],
46
47
+ 'actions' => ['index', 'detail'],
48
49
+ 'roles' => ['@'],
50
51
52
53
54
55
];
56
}
57
0 commit comments