Skip to content

Commit

Permalink
Merge pull request #989 from minrk/hub5
Browse files Browse the repository at this point in the history
jupyterhub 5
  • Loading branch information
manics authored Aug 25, 2024
2 parents 22e08a4 + dcbb376 commit 5278351
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
10 changes: 8 additions & 2 deletions docs/howto/auth/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
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
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/test_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_hub_version():
r = requests.get(HUB_URL + "/hub/api")
r.raise_for_status()
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():
Expand Down
8 changes: 8 additions & 0 deletions tljh/configurer.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ def update_userlists(c, config):
"""
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.blocked_users = set(users["banned"])
c.Authenticator.admin_users = set(users["admin"])
Expand Down
2 changes: 1 addition & 1 deletion tljh/requirements-hub-env.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# If a dependency is bumped to a new major version, we should make a major
# version release of tljh.
#
jupyterhub>=4.0.2,<5
jupyterhub>=5.1.0,<6
jupyterhub-systemdspawner>=1.0.1,<2
jupyterhub-firstuseauthenticator>=1.0.0,<2
jupyterhub-nativeauthenticator>=1.2.0,<2
Expand Down

0 comments on commit 5278351

Please sign in to comment.