From 49e84620290530f515219500a782cef5b3c06046 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 12 Jun 2023 14:49:28 +0800 Subject: [PATCH] bugfix --- ahserver/auth_api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ahserver/auth_api.py b/ahserver/auth_api.py index e742fdd..2ddf99c 100755 --- a/ahserver/auth_api.py +++ b/ahserver/auth_api.py @@ -58,11 +58,10 @@ class AuthAPI(AppLogger): @web.middleware async def checkAuth(self,request,handler): path = request.path - if not await self.needAuth(path): - return await handler(request) user = await auth.get_auth(request) is_ok = await self.checkUserPermission(user, path) if is_ok: + print(f'**{user=}, {path} access **') return await handler(request) print(f'**{user=}, {path} forbidden**') raise web.HTTPForbidden()