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")