You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add access to the site to guests, did as below, but writes an error in the logs
TodoController
public function initialize()
{
$this->loadComponents([
'Auth' => [
'authorize' => ['Controller']
],
'Security'
]);
}
public function isAuthorized()
{
$action = $this->request->param('action');
$role = (!empty(Session::getUserRole()) ? Session::getUserRole() : 'guest');
$resource = "todo";
// only for admins
Permission::allow('admin', $resource, ['*']);
// only for normal users
Permission::allow('guest', $resource, ['index','getList']);
// only for normal users
Permission::allow('user', $resource, ['index','getList', 'create']);
Permission::allow('user', $resource, ['getMain'], 'owner');
}
writes in logs (not always): guest is not allowed to perform getmain action on todo (
Add access to the site to guests, did as below, but writes an error in the logs
TodoController
writes in logs (not always): guest is not allowed to perform getmain action on todo (
miniPHP/app/models/Permission.php
Line 72 in 7ddf0c9
The text was updated successfully, but these errors were encountered: