Helloy guys, i need your help, im using yii2.
im increasing a session variable everytime the user / guest is reloading a site, with an auth user it works but not with the guest, the guest has the right to join the actions in controller. Do i have to give the guest role a right to do post requests? here you can see my behavoirs method, but its not working.
public function behaviors() {
return [
'access' => [
'class' => AccessControl::className(),
'only' => ['actionPruefungstarten', 'actionTeilnehmerauswahlspeichern', 'actionSp', 'actionIndex', 'actionStartdashboard'],
'rules' => [
[
'allow' => true,
'verbs' => ['POST'],
'roles' => ['?'],
],
[
'allow' => true,
'roles' => ['@'],
],
],
],
];
}