closed admin panel

This commit is contained in:
akosse
2020-01-29 11:26:01 +03:00
parent 75ccbff934
commit aa501900e4
29 changed files with 876 additions and 17 deletions

View File

@ -7,6 +7,8 @@ use Yii;
use backend\modules\notes\models\Note;
use common\models\FieldsValueNew;
use yii\data\ActiveDataProvider;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
@ -15,6 +17,30 @@ use yii\web\NotFoundHttpException;
*/
class NotesController extends Controller
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'roles' => ['admin'],
],
],
],
];
}
/**
* Renders the index view for the module
* @return string