Can I make a custom panel area (“dashboard”) only visible for accounts with the admin role? The other roles (Editor, Viewer, …) should not have access to the dashboard. Preferably I would just hide the sidebar menu item “Dashboard”.
Have you tried access permissions in the user role blueprints for non-admins?
If that doesn’t work, you could hide the menu item based on role in your custom area und do a redirect in the route action to prevent direct access to the path for non-admin roles
I would also like to “hide the menu item based on role in your custom area”.
And I hoped it would be
Kirby::plugin('leobard/deploy-yourself', [
'areas' => function () => {
if(kirby()->user()?->role() == 'admin') return [
...area goes here
]
]);
I found Permissions | Kirby CMS not immediately intuitive to use, as I would have to remove access to the area of my plugin for all multiple non-admin roles.