Hi,
Iām learning Kirby at he moment and would like to restrict panel access on a language level depending on the role a user is assigned to.
For example: A user who is assigned to a role, āGerman editorā, is only supposed to āCRUDā German content. English is the default language. I found the following code here:
(https://k2.getkirby.com/docs/cheatsheet/permissions/panel-page-update)
// site/roles/editor_fr.php
return [
ānameā => āGerman editorā,
ādefaultā => false,
āpermissionsā => [
ā*ā => true,
āpanel.page.updateā => function () {
return $this->language()->code() === ādeā;
},
],
];
created a file, in this case āsite/roles/editor_de.phpā, same file name as the site/blueprints/users/editor_de.yml" file, thought maybe itās important, and copied the code into the file. When logging in as a user assigned to the āGerman editorā role, all content is still editable. What am I missing? Or maybe this logic only works in Kirby 2? Any hint would be very much appreciated. Thank U.