Commit c2737f34 by Скуратович Александр

доступы

1 parent 03183eb3
...@@ -5,6 +5,7 @@ namespace app\controllers; ...@@ -5,6 +5,7 @@ namespace app\controllers;
use Yii; use Yii;
use app\models\Filter; use app\models\Filter;
use app\models\FilterSearch; use app\models\FilterSearch;
use yii\filters\AccessControl;
use yii\web\Controller; use yii\web\Controller;
use yii\web\NotFoundHttpException; use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter; use yii\filters\VerbFilter;
...@@ -20,6 +21,17 @@ class FilterController extends Controller ...@@ -20,6 +21,17 @@ class FilterController extends Controller
public function behaviors() public function behaviors()
{ {
return [ return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [ 'verbs' => [
'class' => VerbFilter::className(), 'class' => VerbFilter::className(),
'actions' => [ 'actions' => [
......
...@@ -5,6 +5,7 @@ namespace app\controllers; ...@@ -5,6 +5,7 @@ namespace app\controllers;
use Yii; use Yii;
use app\models\Host; use app\models\Host;
use app\models\HostSearch; use app\models\HostSearch;
use yii\filters\AccessControl;
use yii\web\Controller; use yii\web\Controller;
use yii\web\NotFoundHttpException; use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter; use yii\filters\VerbFilter;
...@@ -20,6 +21,15 @@ class HostController extends Controller ...@@ -20,6 +21,15 @@ class HostController extends Controller
public function behaviors() public function behaviors()
{ {
return [ return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [ 'verbs' => [
'class' => VerbFilter::className(), 'class' => VerbFilter::className(),
'actions' => [ 'actions' => [
......
...@@ -5,6 +5,7 @@ namespace app\controllers; ...@@ -5,6 +5,7 @@ namespace app\controllers;
use Yii; use Yii;
use app\models\Host; use app\models\Host;
use app\models\HostSearch; use app\models\HostSearch;
use yii\filters\AccessControl;
use yii\web\Controller; use yii\web\Controller;
use yii\web\NotFoundHttpException; use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter; use yii\filters\VerbFilter;
...@@ -20,6 +21,15 @@ class HostFreeController extends Controller ...@@ -20,6 +21,15 @@ class HostFreeController extends Controller
public function behaviors() public function behaviors()
{ {
return [ return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [ 'verbs' => [
'class' => VerbFilter::className(), 'class' => VerbFilter::className(),
'actions' => [ 'actions' => [
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!