From 5e03d611dc35d885b1133130258b8cded4316dd5 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 12 Jun 2023 16:00:51 +0800 Subject: [PATCH] bugfix --- ahserver/auth_api.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ahserver/auth_api.py b/ahserver/auth_api.py index 8db1839..77408a6 100755 --- a/ahserver/auth_api.py +++ b/ahserver/auth_api.py @@ -50,11 +50,6 @@ class AuthAPI(AppLogger): auth.setup(app, policy) print('add auth middleware ....................') app.middlewares.append(self.checkAuth) - # app.router.add_route('GET', '/logout', self.logout) - - async def logout(self,request): - await auth.forget(request) - return web.Response(body='OK'.encode('utf-8')) @web.middleware async def checkAuth(self,request,handler): @@ -68,7 +63,8 @@ class AuthAPI(AppLogger): raise web.HTTPForbidden() async def checkUserPermission(self, user, path): - return True + raise Exception('checkUserPermission()') + return False async def needAuth(self,path): return False