Restrict User/Role to specific language

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.