mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 22:43:00 +00:00
Update collaboration-users.md
This commit is contained in:
@@ -78,7 +78,7 @@ c.JupyterHub.load_roles = []
|
|||||||
c.JupyterHub.load_groups = {
|
c.JupyterHub.load_groups = {
|
||||||
# collaborative accounts get added to this group
|
# collaborative accounts get added to this group
|
||||||
# so it's easy to see which accounts are collaboration accounts
|
# so it's easy to see which accounts are collaboration accounts
|
||||||
"collaborative": [],
|
"collaborative": {"users": []},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -102,12 +102,12 @@ for project_name, project in project_config["projects"].items():
|
|||||||
members = project.get("members", [])
|
members = project.get("members", [])
|
||||||
print(f"Adding project {project_name} with members {members}")
|
print(f"Adding project {project_name} with members {members}")
|
||||||
# add them to a group for the project
|
# add them to a group for the project
|
||||||
c.JupyterHub.load_groups[project_name] = members
|
c.JupyterHub.load_groups[project_name]["users"] = members
|
||||||
# define a new user for the collaboration
|
# define a new user for the collaboration
|
||||||
collab_user = f"{project_name}-collab"
|
collab_user = f"{project_name}-collab"
|
||||||
# add the collab user to the 'collaborative' group
|
# add the collab user to the 'collaborative' group
|
||||||
# so we can identify it as a collab account
|
# so we can identify it as a collab account
|
||||||
c.JupyterHub.load_groups["collaborative"].append(collab_user)
|
c.JupyterHub.load_groups["collaborative"]["users"].append(collab_user)
|
||||||
|
|
||||||
# finally, grant members of the project collaboration group
|
# finally, grant members of the project collaboration group
|
||||||
# access to the collab user's server,
|
# access to the collab user's server,
|
||||||
|
Reference in New Issue
Block a user