Currently this is not something the login plugin provides. It assumes the page is visible, you can navigate there, but are prompted to login if you don’t have access.
Hiding the menu can be done by performing the logic in the theme’s twig template that outputs the menu. Basically you would have to ensure the current logged in user (grav.user
) has access that matches the page.header.access
for the page as you build the menu.
The better solution would be if the login plugin has an option to do this. I’ve created an issue there for a future improvement: https://github.com/getgrav/grav-plugin-login/issues/87