Failing to use GroupFilter, generated exception #930
Unanswered
IvanNavarroSommerz
asked this question in
Q&A
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 |
1 reply
@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 |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
All reactions