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

доступы

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