bugfix
This commit is contained in:
parent
6de8db832a
commit
22e6e11fb9
Binary file not shown.
@ -103,7 +103,7 @@ async def checkUserPassword(request, username, password):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
async def basic_auth(sor, request):
|
async def basic_auth(sor, request):
|
||||||
auth = request.headers.get('Authentication')
|
auth = request.headers.get('Authorization')
|
||||||
auther = BasicAuth('x')
|
auther = BasicAuth('x')
|
||||||
m = auther.decode(auth)
|
m = auther.decode(auth)
|
||||||
username = m.login
|
username = m.login
|
||||||
@ -118,7 +118,7 @@ async def basic_auth(sor, request):
|
|||||||
return recs[0].id
|
return recs[0].id
|
||||||
|
|
||||||
async def getAuthenticationUserid(sor, request):
|
async def getAuthenticationUserid(sor, request):
|
||||||
auth = request.headers.get('Authentication')
|
auth = request.headers.get('Authorization')
|
||||||
if auth is None:
|
if auth is None:
|
||||||
return None
|
return None
|
||||||
for h,f in registered_auth_methods.items():
|
for h,f in registered_auth_methods.items():
|
||||||
@ -157,7 +157,8 @@ where c.userid = ${userid}$
|
|||||||
return True
|
return True
|
||||||
debug(f'{userid=} has not permission to call {path=}')
|
debug(f'{userid=} has not permission to call {path=}')
|
||||||
return False
|
return False
|
||||||
debug(f'error happened {userid}, {path}')
|
e = db.e_except
|
||||||
|
debug(f'objcheckperm() error happened {userid}, {path}, {e}\n{format_exc()}')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
registered_auth_methods = {
|
registered_auth_methods = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user