Debian Codegraph @

examples/custom-scopes/jupyterhub_config.py

raw symbols SCIP
1 import sysscip-python python python-stdlib 3.11 sys/__init__:
2
3 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c. = get_config() # noqa
4
5 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.services = [
6 {
7 'name': 'grades',
8 'url': 'http://127.0.0.1:10101',
9 'command': [sysscip-python python python-stdlib 3.11 sys/__init__:.executablescip-python python python-stdlib 3.11 sys/executable.executable., './grades.py'],
10 'oauth_client_allowed_scopes': [
11 'custom:grades:write',
12 'custom:grades:read',
13 ],
14 },
15 ]
16
17 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.custom_scopes = {
18 "custom:grades:read": {
19 "description": "read-access to all grades",
20 },
21 "custom:grades:write": {
22 "description": "Enter new grades",
23 "subscopes": ["custom:grades:read"],
24 },
25 }
26
27 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.load_roles = [
28 {
29 "name": "user",
30 # grant all users access to services
31 "scopes": ["access:services", "self"],
32 },
33 {
34 "name": "grader",
35 # grant graders access to write grades
36 "scopes": ["custom:grades:write"],
37 "users": ["grader"],
38 },
39 {
40 "name": "instructor",
41 # grant instructors access to read, but not write grades
42 "scopes": ["custom:grades:read"],
43 "users": ["instructor"],
44 },
45 ]
46
47 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.allowed_users = {"instructor", "grader", "student"}
48 # dummy spawner and authenticator for testing, don't actually use these!
49 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.authenticator_class = 'dummy'
50 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.spawner_class = 'simple'
51 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.ip = '127.0.0.1' # let's just run on localhost while dummy auth is enabled
52 cscip-python python jupyterhub 5.2.1 `examples.custom-scopes.jupyterhub_config`/c..JupyterHub.log_level = 10