Skip to content

Commit

Permalink
V1.14
Browse files Browse the repository at this point in the history
完成文章详细页面
  • Loading branch information
michaelweixi committed Nov 24, 2016
1 parent 5b32c75 commit 44e819a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions frontend/controllers/PostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;

use common\models\Tag;
use common\models\Comment;
Expand All @@ -31,6 +32,26 @@ public function behaviors()
'delete' => ['POST'],
],
],


'access' =>[
'class' => AccessControl::className(),
'rules' =>
[
[
'actions' => ['index'],
'allow' => true,
'roles' => ['?'],
],
[
'actions' => ['index', 'detail'],
'allow' => true,
'roles' => ['@'],
],
],
],


];
}

Expand Down

0 comments on commit 44e819a

Please sign in to comment.