public function behaviors() { return ['access' => ['class' => AccessControl::className(), 'only' => ['logout', 'agents', 'operator'], 'rules' => [['actions' => ['logout', 'agents'], 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return PermissionHelpers::requireAgent(); }], ['actions' => ['logout', 'operator'], 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return PermissionHelpers::requireOperator(); }]]], 'verbs' => ['class' => VerbFilter::className(), 'actions' => ['logout' => ['post']]]]; }
public function behaviors() { return ['access' => ['class' => AccessControl::className(), 'only' => ['index', 'create', 'change', 'confirmed', 'processing', 'annulation', 'failure', 'list', 'reports', 'datas', 'comission', 'change_password', 'responder_settings', 'back_connect'], 'rules' => [['actions' => ['index', 'create', 'change', 'confirmed', 'processing', 'annulation', 'failure', 'list', 'reports', 'datas', 'comission', 'change_password', 'responder_settings', 'back_connect'], 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return PermissionHelpers::requireAgent(); }]]], 'verbs' => ['class' => VerbFilter::className(), 'actions' => ['logout' => ['post']]]]; }