does anyone know how to hide the links to Accounts and/or Settings in the Panel for Editor-Users?
My customers legitimately ask, why they see a link, they can’t access.
Independently of not seeing an unique identifier in those links, would it be possible to differentiate by the user-role in a custom panel-css in general?
thx @moonwalk, but it would be nice, if somebody knows a solution for 3.5.
also a solution for adding differnet css-rules by user-role would be very welcome
I’m not aware of a solution for 3.5, unless it is possible to overwrite the topbar menu.
As regards custom Panel styles per user role, you could different stylesheets per role inside the ready config option where you have access to the Kirby user:
What do you mean? Depending on domain? Then you can use different config files and there define different panel stylesheets.
I’m not aware of a way to load multiple panel stylesheets, the customCSS method in the Panel class only accepts a single file that needs to exist in the file system. Would be cool if it was possible to load a dynamic stylesheet via a route in an easy way.
Would have been nice, if kirby could add several custom panel.css
one by role, one by .env / config.domain.com.php
But prerendered would works also.
Thx again for the Ready-Hint.
i dived a bit deeper in this test to add a custom-css by user-role and hide some unused links…
until now i tested with a logged in user - so on ready the user and their role is known.
but if no user is logged in, that wont work and on ‘ready’ no user is available. so no role either
is there a possibility to add a custom-css after login?
or to write a ‘class’ to the body by js?
independently of that, does anyone knows, if there is a possibility to add css-variables to the panel?