Hide "Created by..." for non-registered users?

I’d like to hide the “Created by” in the footer for folks who aren’t logged in. @gianfranco asks about it (Hide Created by - #2 by acotiuga), but the answer given applies to “Last modified”, which is part of the Flamingo skin, not “Created by”, which is not part of the skin and is located in PageAuthorsUIX.xml.

Is it possible to hide this for users who aren’t logged in? I’ve dabbled with hiding it with a UI Extension class, but haven’t found the appropriate way yet.

Thanks in advance!

Hi!

What you’re talking about is the UIX in XWiki.PageAuthorsUIX as far as I understand.
You can add a couple lines to the UIX content to check the current user permissions or check if the user is a guest.

Here are a few places with similar things done that will guide you towards a solution:

Let me know if you still have trouble with this implementation!
Lucas C.

Thanks so much for your response, @CharpentierLucas. Apologies for the delay in responding. I’ve been chasing another issue and trying to get a build environment working to do so, which has been a rabbit hole. I’m going to revisit this once I come back up for air. I’ll post an update when I do. Thanks again!

1 Like