Skip to content

Fix header tools so login and logout are not both shown after authent… - #162

Open
aryan7081 wants to merge 1 commit into
plone:mainfrom
aryan7081:fix-header-tools-auth-state
Open

Fix header tools so login and logout are not both shown after authent…#162
aryan7081 wants to merge 1 commit into
plone:mainfrom
aryan7081:fix-header-tools-auth-state

Conversation

@aryan7081

@aryan7081 aryan7081 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #161

This issue happened because the development header tools in packages/layout/slots/Tools.tsx always rendered both /login and /logout and never read authentication state. The root loader already exposes isAuthenticated, but the tools slot ignored it, so both links stayed visible after a successful login.

This fix reads isAuthenticated from the root loader and shows only Log in for anonymous visitors and only Log out for authenticated users. It keeps the links development-only, uses translated labels with English fallbacks, and adds a layout news fragment for the changelog.

Caution

The Volto Team has suspended its review of new pull requests from first-time contributors until the release of Plone 7, which is preliminarily scheduled for the second quarter of 2026.
Read details.



If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Header tools show both Log in and Log out after authenticating

1 participant