mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
init users when creating tokens
This commit is contained in:
@@ -95,8 +95,6 @@ class NewToken(Application):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
name = Unicode(getuser())
|
name = Unicode(getuser())
|
||||||
aliases = {}
|
|
||||||
flags = {}
|
|
||||||
|
|
||||||
def parse_command_line(self, argv=None):
|
def parse_command_line(self, argv=None):
|
||||||
super().parse_command_line(argv=argv)
|
super().parse_command_line(argv=argv)
|
||||||
@@ -110,6 +108,7 @@ class NewToken(Application):
|
|||||||
def start(self):
|
def start(self):
|
||||||
hub = JupyterHub(parent=self)
|
hub = JupyterHub(parent=self)
|
||||||
hub.init_db()
|
hub.init_db()
|
||||||
|
hub.init_users()
|
||||||
user = orm.User.find(hub.db, self.name)
|
user = orm.User.find(hub.db, self.name)
|
||||||
if user is None:
|
if user is None:
|
||||||
print("No such user: %s" % self.name)
|
print("No such user: %s" % self.name)
|
||||||
|
Reference in New Issue
Block a user