yii2-rbac icon indicating copy to clipboard operation
yii2-rbac copied to clipboard

RBAC whitelist in config does not allow POST

Open crimson-med opened this issue 5 years ago • 0 comments

Hello,

I have added this in config/web.php

'as access' => [
    'class' => yii2mod\rbac\filters\AccessControl::class,
    'allowActions' => [
        'site/*',
        'admin/*',
        'note/*',
    ]
 ],

If I make an AJAX POST request to my controller action. controllers/NoteController.php

public function actionDelete() {
    echo "hello world";
    die();
}

I will get access denied however if I make a AJAX GET request I have no issue.

crimson-med avatar Oct 09 '19 04:10 crimson-med