-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Hide log out button when auth is not enabled #9158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The frontend config is also updated by "ConfigSaved" events, which do not include the extra fields added at the `/rest/config` API endpoint, which results in the no auth warning being shown briefly until the config reloads. Let's just duplicate the `IsAuthEnabled()` logic on the front-end side instead.
While touching this code, can you add a divider before the "Log Out" button? It's not really related in any way to "Advanced" and "Logs". |
Done. Or should we perhaps move it to the "Shutdown" and "Restart" group? Like this: One drawback of this is it can take a second before the config loads, in which case "Log out" suddenly appears and pushes the rest down if one already has the menu open. Which could make you click the wrong button if it suddenly changes just as you're about to click. |
Could we move that group to the bottom? |
Maybe something like this?
|
I think the Ban icon ( And perhaps add a divider before the Log Out button? The thing is there is no confirmation dialog when you click Restart or Shutdown, and this change to the menu order would mess with some people's muscle memory, adding a divider before Log Out button should minimize misclicking. |
Done.
Done.
This seems to balloon the scope of the PR a bit too much, and I'd prefer to not hold up the original fix with an extended discussion of if and how to move things around in the menu, so I'd prefer to punt that to a separate PR/issue. Whatever change the discussion settles on, its implementation in code will take orders of magnitude less time than the discussion itself (no offense to anyone involved, that's just the reality of this kind of thing where there's no single clearly correct solution). So, this is what the menu looks like as of commit 558ad4f: Thoughts on leaving this PR at that, and punting the discussion of moving things around to a separate PR/issue? |
It's not a very huge deal but I would suggest moving the button (with its divider) after the Support Bundle then. Otherwise, there will still be jumping when one has debugging enabled and the button pops up later than the rest of the menu entries. |
This should probably go into the next .rc as well, since it fixes an issue with new code in the upcoming release. |
Purpose
This was an oversight in #8757: the new "Log out" button is always shown in the "Actions" menu, even when authentication is not enabled.
Testing
These manual tests have been done:
Screenshots
Before (3d0da5a):
After (f032f07):
Documentation
No changes needed.