From 674ec1626e22792b0fe5dc3e13763f1a04f35138 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 14 Nov 2024 11:03:17 +0800 Subject: [PATCH] bugfix --- ahserver/auth_api.py | 4 ++-- ahserver/webapp.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ahserver/auth_api.py b/ahserver/auth_api.py index 1a31e79..7bc1e4e 100755 --- a/ahserver/auth_api.py +++ b/ahserver/auth_api.py @@ -86,7 +86,7 @@ class AuthAPI: def __init__(self): self.conf = getConfig() - async def checkUserPermission(self, user, path): + async def checkUserPermission(self, request, user, path): # print('************* checkUserPermission() use default one ****************') return True @@ -153,7 +153,7 @@ class AuthAPI: path = request.path userinfo = await get_session_userinfo(request) user = userinfo.userid - is_ok = await self.checkUserPermission(user, path) + is_ok = await self.checkUserPermission(request, user, path) t2 = time.time() ip = get_client_ip(None, request) if is_ok: diff --git a/ahserver/webapp.py b/ahserver/webapp.py index fa1ed9b..7df94d5 100644 --- a/ahserver/webapp.py +++ b/ahserver/webapp.py @@ -5,6 +5,7 @@ from appPublic.folderUtils import ProgramPath from appPublic.jsonConfig import getConfig from ahserver.configuredServer import ConfiguredServer from ahserver.serverenv import ServerEnv +from appPublic.jsonConfig import getConfig def webapp(init_func): parser = argparse.ArgumentParser(prog="Sage")