[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2025-08-13 15:31:18 +00:00
parent 20895dba83
commit 37fd7af917

View File

@@ -1330,7 +1330,10 @@ class BaseHandler(RequestHandler):
if self.authenticator.refresh_pre_stop: if self.authenticator.refresh_pre_stop:
auth_user = await self.refresh_auth(user, force=True) auth_user = await self.refresh_auth(user, force=True)
if auth_user is None: if auth_user is None:
if self.current_user.kind == "user" and self.current_user.name == user.name: if (
self.current_user.kind == "user"
and self.current_user.name == user.name
):
raise web.HTTPError( raise web.HTTPError(
403, "auth has expired for %s, login again", user.name 403, "auth has expired for %s, login again", user.name
) )