diff --git a/controllers/ArticleController.php b/controllers/ArticleController.php index 6e8e56e..832b421 100755 --- a/controllers/ArticleController.php +++ b/controllers/ArticleController.php @@ -12,6 +12,7 @@ use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; use yii\web\Response; + use yii\filters\AccessControl; /** * BlogArticleController implements the CRUD actions for BlogArticle model. @@ -38,6 +39,22 @@ 'delete' => [ 'POST' ], ], ], + 'access' => [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'actions' => [ + 'login', + 'error', + ], + 'allow' => true, + ], + [ + 'allow' => true, + 'roles' => [ '@' ], + ], + ], + ], ]; } diff --git a/controllers/CategoryController.php b/controllers/CategoryController.php index 0f4480a..2784769 100755 --- a/controllers/CategoryController.php +++ b/controllers/CategoryController.php @@ -10,6 +10,7 @@ use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; use yii\web\Response; + use yii\filters\AccessControl; /** * BlogCategoryController implements the CRUD actions for BlogCategory model. @@ -36,6 +37,22 @@ 'delete' => [ 'POST' ], ], ], + 'access' => [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'actions' => [ + 'login', + 'error', + ], + 'allow' => true, + ], + [ + 'allow' => true, + 'roles' => [ '@' ], + ], + ], + ], ]; } diff --git a/controllers/TagController.php b/controllers/TagController.php index f313d3a..60f3182 100755 --- a/controllers/TagController.php +++ b/controllers/TagController.php @@ -9,6 +9,7 @@ use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; use yii\web\Response; + use yii\filters\AccessControl; /** * BlogTagController implements the CRUD actions for BlogTag model. @@ -32,6 +33,22 @@ 'delete' => [ 'POST' ], ], ], + 'access' => [ + 'class' => AccessControl::className(), + 'rules' => [ + [ + 'actions' => [ + 'login', + 'error', + ], + 'allow' => true, + ], + [ + 'allow' => true, + 'roles' => [ '@' ], + ], + ], + ], ]; } -- libgit2 0.21.4