Commit d09c0837 authored by Shakarim Sapa's avatar Shakarim Sapa

- Добавили accessControl

parent 64249dc3
......@@ -3,6 +3,7 @@ namespace common\modules\analyticsSchool\controllers;
use common\components\FrontendController;
use common\modules\school\models\SearchCourses;
use yii\filters\AccessControl;
class CourseController extends FrontendController {
public static function actionsTitles()
......@@ -12,6 +13,23 @@ class CourseController extends FrontendController {
];
}
public function behaviors() {
return [
'access' => [
'class' => AccessControl::className(),
'user' => 'support',
'only' => ['view', 'index'],
'rules' => [
[
'allow' => true,
'actions' => ['view', 'index'],
'roles' => ['?'],
],
],
],
];
}
public function actionIndex(){
\Yii::$app->view->registerMetaTag([
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment