bugfix
This commit is contained in:
parent
bb87ec994b
commit
ebc972fb80
@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"models_dir": "${HOME}$/py/rbac/models",
|
|
||||||
"output_dir": "${HOME}$/py/sage/wwwroot/_a/rolepermission",
|
|
||||||
"dbname": "sage",
|
|
||||||
"tblname": "rolepermission",
|
"tblname": "rolepermission",
|
||||||
"title":"用户",
|
"title":"用户",
|
||||||
"params": {
|
"params": {
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"models_dir": "${HOME}$/py/rbac/models",
|
|
||||||
"output_dir": "${HOME}$/py/sage/wwwroot/_a/userdepartment",
|
|
||||||
"dbname": "sage",
|
|
||||||
"tblname": "userdepartment",
|
"tblname": "userdepartment",
|
||||||
"title":"用户",
|
"title":"用户",
|
||||||
"params": {
|
"params": {
|
||||||
|
|||||||
@ -102,7 +102,8 @@ async def checkUserPassword(request, username, password):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
async def basic_auth(sor, auth):
|
async def basic_auth(sor, request):
|
||||||
|
auth = request.headers.get('Authentication')
|
||||||
auther = BasicAuth('x')
|
auther = BasicAuth('x')
|
||||||
m = auther.decode(auth)
|
m = auther.decode(auth)
|
||||||
username = m.login
|
username = m.login
|
||||||
@ -122,7 +123,7 @@ async def getAuthenticationUserid(sor, request):
|
|||||||
return None
|
return None
|
||||||
for h,f in registered_auth_methods.items():
|
for h,f in registered_auth_methods.items():
|
||||||
if auth.startswith(h):
|
if auth.startswith(h):
|
||||||
return await f(auth)
|
return await f(sor, request)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
async def objcheckperm(obj, request, userid, path):
|
async def objcheckperm(obj, request, userid, path):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user