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.