Replies: 4 comments 1 reply
-
Hello,
|
Beta Was this translation helpful? Give feedback.
-
See also https://codeigniter4.github.io/CodeIgniter4/general/configuration.html#registrars |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
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?
Beta Was this translation helpful? Give feedback.
All reactions