frontend controllers behaviors access
This commit is contained in:
parent
6d37a8ef18
commit
f90a70811e
@ -4,8 +4,8 @@ namespace frontend\modules\access\controllers;
|
|||||||
|
|
||||||
use Yii;
|
use Yii;
|
||||||
use common\models\Accesses;
|
use common\models\Accesses;
|
||||||
use frontend\modules\access\models\AccessSearch;
|
|
||||||
use yii\data\ActiveDataProvider;
|
use yii\data\ActiveDataProvider;
|
||||||
|
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;
|
||||||
@ -27,6 +27,15 @@ class AccessController extends Controller
|
|||||||
'delete' => ['POST'],
|
'delete' => ['POST'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'access' => [
|
||||||
|
'class' => AccessControl::className(),
|
||||||
|
'rules' => [
|
||||||
|
[
|
||||||
|
'allow' => true,
|
||||||
|
'roles' => ['@'],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class UserCardController extends Controller
|
|||||||
return [
|
return [
|
||||||
'access' => [
|
'access' => [
|
||||||
'class' => AccessControl::className(),
|
'class' => AccessControl::className(),
|
||||||
'only' => ['index', 'update'],
|
//'only' => ['index', 'update'],
|
||||||
'rules' => [
|
'rules' => [
|
||||||
[
|
[
|
||||||
'allow' => true,
|
'allow' => true,
|
||||||
|
@ -2,12 +2,10 @@
|
|||||||
|
|
||||||
namespace frontend\modules\reports\controllers;
|
namespace frontend\modules\reports\controllers;
|
||||||
|
|
||||||
use common\classes\Debug;
|
|
||||||
use common\models\Accesses;
|
|
||||||
use Yii;
|
use Yii;
|
||||||
use common\models\Reports;
|
use common\models\Reports;
|
||||||
use frontend\modules\reports\models\ReportsSearch;
|
use frontend\modules\reports\models\ReportsSearch;
|
||||||
use yii\data\ActiveDataProvider;
|
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;
|
||||||
@ -29,6 +27,15 @@ class ReportsController extends Controller
|
|||||||
'delete' => ['POST'],
|
'delete' => ['POST'],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'access' => [
|
||||||
|
'class' => AccessControl::className(),
|
||||||
|
'rules' => [
|
||||||
|
[
|
||||||
|
'allow' => true,
|
||||||
|
'roles' => ['@'],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user