Brainstorming: configuration option to hide the Login button?

Hello!

Context

Since XWIKI-16.10.0RC1, the login and Register buttons have been moved from the top of the drawer to the top navbar.
As mentionned in the release notes, for instances that are for the most part readonly, this could be seen as a regression. Currently the best way to remove the Login button from the UI is to update the Interface Extension and remove the button directly from the template.

Main topic

Should we provide a configuration parameter to the administrator to disable this Login button easily (understand without editing a velocity template on an object of a hidden page)?

Opinion

IMO the administrators of such instances were probably already hiding the drawer or at least part of the drawer using a very similar method. We did not consider adding a configuration option for those use cases, so I doubt we need to provide one here (no need from the users).

If we start getting questions about how to do this on the forum or we have a lot of traffic on the FAQ, I reckon we should add an option, but I wouldn’t add one without a confirmation.


I’m looking forward to your opinion on the subject!
Lucas C.

Not sure what you mean by update the Interface Extension. Isn’t this implemented as a UIX? And if not, why isn’t it? :slight_smile:

EDIT: I guess it might be implemented as a UIX but not within a wiki page, ie inside a velocity template. Is that it? Do you have a link to it?

I don’t think so, at least not if we have a UIX for it. But I’d add a FAQ entry to explain how to do it.

I agree we don’t need such a feature now, unless it’s asked (I haven’t checked jira to see if that was asked), but I think we need a FAQ entry for it, and that’s easy to add.

Thanks

Interface Extension from what I understand is just the full worded way to say UIX. If that’s not the case, then I’ll provide some changes to https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/UIXTutorial/#HAboutInterfaceExtensions to make sure other users don’t get confused.

It’s a UIX object on the Registration page → xwiki-platform/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-ui/src/main/resources/XWiki/Registration.xml at 4dc4b618f94dcd8b4b97b140cfd25637f1e72f2f · xwiki/xwiki-platform · GitHub
The content of the UIX is a template, and that’s what should be updated by admins to get rid of this new button.

I’ve written https://www.xwiki.org/xwiki/bin/view/FAQ/How%20to%20hide%20the%20Login%20button a couple hours ago. Feel free to update it :slight_smile:


Thanks for your feedback!
Lucas C.

cool thx! Small note that the content you added has:

{{version since="16.10.0RC1"}}
 XWiki has a login button on the top navigation bar. 
{{/version}}

[[image:https://www.xwiki.org/xwiki/bin/download/ReleaseNotes/Data/XWiki/16.10.0RC1/Entry002/WebHome/22121-navbarloggedOut.png?rev=1.1]]

----
[...]
* Access the hidden page ##Registration. In order to toggle hidden page display, use ##x+x+x+h.
* Update the content of the ##XWiki.UIExtensionClass ##object you can find on ##Registration:##
** Remove lines 11 to 15, containing the template for the button:

{{code language="html+velocity"}}
#if ($xcontext.user == 'XWiki.XWikiGuest' && !$xcontext.inactiveUserReference)
<li>
  <a href="$xwiki.getURL('XWiki.XWikiLogin', 'login', "xredirect=$redirectURL&loginLink=1")" id="tmLogin" rel="nofollow">$escapetool.xml($services.localization.render('login'))</a>
</li>
#end
{{/code}}

* Save your changes.
[...]
[[image:1732029368722-340.png]]

There are a few things that should be improved to follow our doc best practices:

  • Use the {{image}} macro
  • Never use a full URL when we link to wiki page but always a reference.
  • Reusing an image from another page is a risk and I feel it’s better to copy the image, especially since you reference a specific version so the doc will not benefit from an auto update of the image.
  • Do not duplicate doc. Instead of In order to toggle hidden page display, use ##x+x+x+h, link to the ref doc → extensions:Extension.User Profile Application#HEditPreferences
  • Fix the ##..## notation which is wrongly used in several places
  • Use the right way to have a list with a code block as a list item (it’s missing a group)
  • Use suggestive names for images → 1732029368722-340.png is not suggestive :wink: see https://dev.xwiki.org/xwiki/bin/view/Community/DocGuide#HScreenshots2FImages
  • The version macro should apply to the whole content since it only makes sense for XWiki 16.10.0.RC1+

EDIT: I’ve fixed most of the issues → https://www.xwiki.org/xwiki/bin/view/FAQ/How%20to%20hide%20the%20Login%20button?viewer=changes&rev1=3.2&rev2=7.1&

Thanks for documenting this.

2 Likes