Merge pull request #989 from minrk/hub5

jupyterhub 5
This commit is contained in:
Simon Li
2024-08-25 15:09:36 +01:00
committed by GitHub
4 changed files with 18 additions and 4 deletions

View File

@@ -91,10 +91,16 @@ For more information on `tljh-config`, see [](/topic/tljh-config).
4. Tell your JupyterHub to _use_ the GitHub OAuthenticator for authentication: 4. Tell your JupyterHub to _use_ the GitHub OAuthenticator for authentication:
``` ```
sudo tljh-config set auth.type oauthenticator.github.GitHubOAuthenticator sudo tljh-config set auth.type github
``` ```
5. Restart your JupyterHub so that new users see these changes: 5. Tell JupyterHub which users to allow, if you haven't already:
```
sudo tljh-config add-item users.allowed good-user_1
```
6. Restart your JupyterHub so that new users see these changes:
``` ```
sudo tljh-config reload sudo tljh-config reload

View File

@@ -33,7 +33,7 @@ def test_hub_version():
r = requests.get(HUB_URL + "/hub/api") r = requests.get(HUB_URL + "/hub/api")
r.raise_for_status() r.raise_for_status()
info = r.json() info = r.json()
assert V("4") <= V(info["version"]) <= V("5") assert V("5.1") <= V(info["version"]) <= V("6")
async def test_user_code_execute(): async def test_user_code_execute():

View File

@@ -199,6 +199,14 @@ def update_userlists(c, config):
""" """
users = config["users"] users = config["users"]
if (
not users["allowed"]
and config["auth"]["type"] == default["auth"]["type"]
and "allow_all" not in c.FirstUseAuthenticator
):
# _default_ authenticator, enable allow_all if no users specified
c.FirstUseAuthenticator.allow_all = True
c.Authenticator.allowed_users = set(users["allowed"]) c.Authenticator.allowed_users = set(users["allowed"])
c.Authenticator.blocked_users = set(users["banned"]) c.Authenticator.blocked_users = set(users["banned"])
c.Authenticator.admin_users = set(users["admin"]) c.Authenticator.admin_users = set(users["admin"])

View File

@@ -8,7 +8,7 @@
# If a dependency is bumped to a new major version, we should make a major # If a dependency is bumped to a new major version, we should make a major
# version release of tljh. # version release of tljh.
# #
jupyterhub>=4.0.2,<5 jupyterhub>=5.1.0,<6
jupyterhub-systemdspawner>=1.0.1,<2 jupyterhub-systemdspawner>=1.0.1,<2
jupyterhub-firstuseauthenticator>=1.0.0,<2 jupyterhub-firstuseauthenticator>=1.0.0,<2
jupyterhub-nativeauthenticator>=1.2.0,<2 jupyterhub-nativeauthenticator>=1.2.0,<2