bugfix
This commit is contained in:
parent
76da02338e
commit
674ec1626e
@ -86,7 +86,7 @@ class AuthAPI:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.conf = getConfig()
|
self.conf = getConfig()
|
||||||
|
|
||||||
async def checkUserPermission(self, user, path):
|
async def checkUserPermission(self, request, user, path):
|
||||||
# print('************* checkUserPermission() use default one ****************')
|
# print('************* checkUserPermission() use default one ****************')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ class AuthAPI:
|
|||||||
path = request.path
|
path = request.path
|
||||||
userinfo = await get_session_userinfo(request)
|
userinfo = await get_session_userinfo(request)
|
||||||
user = userinfo.userid
|
user = userinfo.userid
|
||||||
is_ok = await self.checkUserPermission(user, path)
|
is_ok = await self.checkUserPermission(request, user, path)
|
||||||
t2 = time.time()
|
t2 = time.time()
|
||||||
ip = get_client_ip(None, request)
|
ip = get_client_ip(None, request)
|
||||||
if is_ok:
|
if is_ok:
|
||||||
|
@ -5,6 +5,7 @@ from appPublic.folderUtils import ProgramPath
|
|||||||
from appPublic.jsonConfig import getConfig
|
from appPublic.jsonConfig import getConfig
|
||||||
from ahserver.configuredServer import ConfiguredServer
|
from ahserver.configuredServer import ConfiguredServer
|
||||||
from ahserver.serverenv import ServerEnv
|
from ahserver.serverenv import ServerEnv
|
||||||
|
from appPublic.jsonConfig import getConfig
|
||||||
|
|
||||||
def webapp(init_func):
|
def webapp(init_func):
|
||||||
parser = argparse.ArgumentParser(prog="Sage")
|
parser = argparse.ArgumentParser(prog="Sage")
|
||||||
|
Loading…
Reference in New Issue
Block a user