Pass in truncated username to systemdspawner

This commit is contained in:
yuvipanda
2018-09-14 12:38:13 -07:00
parent f1378754b6
commit 4a3762d38d

View File

@@ -24,6 +24,9 @@ class UserCreatingSpawner(SystemdSpawner):
"""
# FIXME: Move this elsewhere? Into the Authenticator?
system_username = generate_system_username('jupyter-' + self.user.name)
# FIXME: This is a hack. Allow setting username directly instead
self.username_template = system_username
user.ensure_user(system_username)
user.ensure_user_group(system_username, 'jupyterhub-users')
if self.user.admin: