Show/Hide user information in ApplicationHeader

Hey everybody,

I’m looking for a way to show/hide the user information displayed in the right slot of the ApplicationHeader. The decision to show or hide it should be based on the user that is currently logged in.

We want to use the guest user as a technical user, who will be logged into the application automatically. In this case, we don’t want to give the current user the possibility to log out or even see that he is logged in.

Later on, there will be the possibility log in as a “real” user, in which case we want to display the user information panel in the header again.

After having a look at the code it seems like it quite tricky to achieve that. The userInfo property for the <BapPageTemplate> is always set in bap-client/src/core/frame/internal/layout/ApplicationFrameLayout.tsx.

Does anybody know a workaround we could use here? Or is there a project that already does this? I would prefer not to hide the element in the css, but not to render it at all.

Thanks in advance and enjoy your day!

Best
Tine