Adding role and permission for single module

Hi, I have investigated the documentation provided here: https://twillcms.com/docs/user-management/advanced-permissions.html#content-level-role It's not particularly understood. I am looking to add a new role "Translator" to the CMS which will only access one module "systemtexts".
Twill
4 Replies
ifox
ifox9mo ago
Add the following to your twill config:
return [
'enabled' => [
'permissions-management'
],
'permissions' => [
'level' => \A17\Twill\Enums\PermissionLevel::LEVEL_ROLE,
'modules' => ['systemtexts', <all your other modules here>],
],
]
return [
'enabled' => [
'permissions-management'
],
'permissions' => [
'level' => \A17\Twill\Enums\PermissionLevel::LEVEL_ROLE,
'modules' => ['systemtexts', <all your other modules here>],
],
]
Then in the CMS, create a new role, and only allow access on the systemtexts module
kingrozanski
kingrozanski9mo ago
I presume this is generating a roles and groups tables - i already have modules with those names so its conflicting would it be a good idea to update twill to have the twill_ prefix before on those aswell?
ifox
ifox9mo ago
ha, yes indeed
kingrozanski
kingrozanski9mo ago
We will hold off on the task then for now, I hope it can be implemented in an upcoming release.