Hi,
I am using this method: panel.menu | Kirby CMS to add some custom items to the panel sidebar. I would like to have some of these hidden if the logged in user role is not “admin”. Is this possible? Below is an example of one of the custom items I would like to hide based on user role:
'primary' => [
'icon' => 'primary',
'label' => 'Primary schools',
'link' => 'pages/primary',
'current' => function () {
$path = App::instance()->request()->path()->toString();
return Str::contains($path, 'pages/primary');
}
],