use Yii;
use yii\data\ActiveDataProvider;
+use yii\filters\AccessControl;
use yii\helpers\ArrayHelper;
use yii_app\records\Admin;
use yii_app\records\EmployeePayment;
return array_merge(
parent::behaviors(),
[
+ 'access' => [
+ 'class' => AccessControl::class,
+ 'rules' => [
+ [
+ 'allow' => true,
+ 'actions' => ['view', 'index', 'update', 'delete'],
+ 'roles' => ['menu/crud/employee-payment/','employee-paymentEdit'],
+ ],
+ ],
+ 'denyCallback' => function ($rule, $action) {
+ throw new \yii\web\ForbiddenHttpException('У вас нет прав для выполнения данного действия.');
+ }
+ ],
'verbs' => [
'class' => VerbFilter::class,
'actions' => [