authorize subsets of roles

- oauth clients can request a list of roles
- authorization will proceed with the _subset_ of those roles held by the user
- in the future, this subsetting will be refined to the scope level
This commit is contained in:
Min RK
2022-03-11 13:02:46 +01:00
parent fdf23600c0
commit d2eaf90df2
6 changed files with 85 additions and 15 deletions

View File

@@ -31,7 +31,13 @@ c.JupyterHub.load_roles = [
"name": "grader",
# grant graders access to write grades
"scopes": ["custom:grades:write"],
"users": ["grader", "instructor"],
"users": ["grader"],
},
{
"name": "instructor",
# grant instructors access to read, but not write grades
"scopes": ["custom:grades:read"],
"users": ["instructor"],
},
]