From 20895dba832c271426bb9bce9bdd023ff0e592ec Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 13 Aug 2025 08:30:22 -0700 Subject: [PATCH] check it's a user before comparing username --- 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 426bfd5f..e02c0da6 100644 --- a/jupyterhub/handlers/base.py +++ b/jupyterhub/handlers/base.py @@ -1330,7 +1330,7 @@ class BaseHandler(RequestHandler): if self.authenticator.refresh_pre_stop: auth_user = await self.refresh_auth(user, force=True) if auth_user is None: - if self.current_user.name == user.name: + if self.current_user.kind == "user" and self.current_user.name == user.name: raise web.HTTPError( 403, "auth has expired for %s, login again", user.name )