Failing to use GroupFilter, generated exception #930
Replies: 2 comments 3 replies
-
Before anything, you should know that all shield filters are loaded by default. Therefore, there is no need to add filters to file APP/Config/filters.php. $routes->get('/admin/(:segment)', 'AdminCtl::index/$1', ['filter' => 'session:superadmin,admin']);
Please follow the instructions in the document below to upgrade properly. https://github.com/codeigniter4/shield/blob/develop/UPGRADING.md |
Beta Was this translation helpful? Give feedback.
-
@kenjis I highlighted this in the review, and you moved the note up. But in the last few days, I noticed that many users are reloading the filters by mistake. What should be changed so that the documentation is clear on this matter? remunata/techporia23#1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
$routes->get('/admin/(:segment)', 'AdminCtl::index/$1', ['filter' => 'hasAccess:superadmin,admin']);
Using session authenticator.
At line 688 in Session.php, function getSessionUserInfo() breaks, generating an exception:
_Call to undefined function CodeIgniter\Shield\Authentication\Authenticators\setting() _
I tried a few things but with no success, i believe I'm missing something.
This same call at getSessionUserInfo() succeeds in every other context, except when called via the filter path.
I installed both shield and settings libraries manually, not via composer and I'm not sure if it makes any difference.
In APP/Config/Autoload.php, I have:
Any comments mostly appreciated!
Cheers
Beta Was this translation helpful? Give feedback.
All reactions