Replies: 4 comments 1 reply
|
Hello,
|
|
See also https://codeigniter4.github.io/CodeIgniter4/general/configuration.html#registrars |
|
Thanks for the comments. I tried to use the modules Config/Registrar.php file as suggested. <?php
class Registrar
{
public static function AuthGroups(): array
{
return [
'permissions' => [
'users.access' => 'Can manage entries on the IP whitelist',
'users.management' => 'Can view, edit and delete users. Plus manage UserGroups.',
'users.settings' => 'Can view/change user settings',
],
];
}
}But I get an error 500 server response. Not even an error from the CI4 framework. Have I made a mistake or are only core Config items supported and not Shield? |
|
Doh!!! Well that's a nice easy fix. Error be gone! Although the permissions now work fine within the module they don't seem to be accessible outside of the module. That is probably expected behaviour. However, my separate menu module checks permissions to determine which menu items to display. Which now doesn't function as it should. I was hoping to just be able to drop the auth (management) module folder in and only need to make the 1 autoloader namespace modification. |
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to define new permissions used within a module from a file within the modules folder?
All reactions