I have the same question for my plugin GitHub - leobard/deploy-yourself: A script to update a kirby website code (not content) by pulling from git.
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.