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