From 551c65243c46b29111c225a1e9c25407fdbae322 Mon Sep 17 00:00:00 2001 From: Robert Schroll Date: Fri, 19 Jan 2024 18:11:34 -0800 Subject: [PATCH] Black and Prettier formatting --- examples/service-whoami-flask/README.md | 2 +- examples/service-whoami-flask/jupyterhub_config.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/service-whoami-flask/README.md b/examples/service-whoami-flask/README.md index e236c5cd..754dcad4 100644 --- a/examples/service-whoami-flask/README.md +++ b/examples/service-whoami-flask/README.md @@ -27,7 +27,7 @@ After logging in with your local-system credentials, you should see a JSON dump } ``` -This relies on the Hub starting the whoami service, via config (see [jupyterhub_config.py](./jupyterhub_config.py)). For ordinary users to access this service, they need to be given the appropriate scope (again, see [jupyterhub_config.py](./jupyterhub_config.py)). +This relies on the Hub starting the whoami service, via config (see [jupyterhub_config.py](./jupyterhub_config.py)). For ordinary users to access this service, they need to be given the appropriate scope (again, see [jupyterhub_config.py](./jupyterhub_config.py)). A similar service could be run externally, by setting the JupyterHub service environment variables: diff --git a/examples/service-whoami-flask/jupyterhub_config.py b/examples/service-whoami-flask/jupyterhub_config.py index 91d15c37..8ed30f48 100644 --- a/examples/service-whoami-flask/jupyterhub_config.py +++ b/examples/service-whoami-flask/jupyterhub_config.py @@ -7,7 +7,13 @@ c.JupyterHub.services = [ }, ] c.JupyterHub.load_roles = [ - {'name': 'user', 'scopes': ['access:services!service=whoami', 'self']} + { + 'name': 'user', + 'scopes': [ + 'access:services!service=whoami', # access this service + 'self', # and all of the standard things for a user + ], + } ] # dummy auth and simple spawner for testing