-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Logout button cannot be hidden #6300
Comments
Yep, that sounds right. |
Note: this would require changes to
|
@fcollonval probably this could be closed since the menu items can now be customized via the settings system? |
I would not close it as the logout button should be conditioned on server settings. |
Describe the enhancement
Hey, this is an enhancement.
I was looking at the
Logout
behaviour in the classical notebook because I was surprised by the PR #6087 not having a way to hide it as for the Shut down button. Actually, it will not appear in the menu if the server optionquit_button
isTrue
. But this is not coherent with the classical notebook.In the classical notebook, the Login/Logout buttons display depends on
logged_in
andlogin_available
properties ofAuthenticatedHandler
.https://github.com/jupyter/notebook/blob/9560e0cf4c3a3612f7e0f869035e7e3eeb5853a0/notebook/templates/page.html#L139-L145
https://github.com/jupyter/notebook/blob/9560e0cf4c3a3612f7e0f869035e7e3eeb5853a0/notebook/base/handlers.py#L174-L177
https://github.com/jupyter/notebook/blob/9560e0cf4c3a3612f7e0f869035e7e3eeb5853a0/notebook/base/handlers.py#L184-L194
Those parameters are passed to the jinja template as parameters.
Basically if the user equals "anonymous", those buttons should be hidden. This can be obtain by customizing the login handler class.
Now the question is how to apply a similar behaviour in JupyterLab. I presume the main point is to figure out how to send the information to the frontend through the
page_config_data
as for the Shut down button.jupyterlab/jupyterlab/labapp.py
Line 382 in 0af6067
The text was updated successfully, but these errors were encountered: