From 19f02da64d21241d1038e4c8b9f5d82f84030d17 Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 28 Feb 2018 15:56:19 +0100 Subject: [PATCH] should_spawn=False when current_user is None (not logged in) --- jupyterhub/handlers/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterhub/handlers/base.py b/jupyterhub/handlers/base.py index e9f0f907..5e57b66a 100644 --- a/jupyterhub/handlers/base.py +++ b/jupyterhub/handlers/base.py @@ -818,7 +818,7 @@ class UserSpawnHandler(BaseHandler): admin_spawn = False # For non-admins, we should spawn if the user matches # otherwise redirect users to their own server - should_spawn = (current_user.name == name) + should_spawn = (current_user and current_user.name == name) if should_spawn: