This commit is contained in:
yumoqing 2025-07-31 15:58:13 +08:00
parent bb87ec994b
commit ebc972fb80
3 changed files with 3 additions and 8 deletions

View File

@ -1,7 +1,4 @@
{
"models_dir": "${HOME}$/py/rbac/models",
"output_dir": "${HOME}$/py/sage/wwwroot/_a/rolepermission",
"dbname": "sage",
"tblname": "rolepermission",
"title":"用户",
"params": {

View File

@ -1,7 +1,4 @@
{
"models_dir": "${HOME}$/py/rbac/models",
"output_dir": "${HOME}$/py/sage/wwwroot/_a/userdepartment",
"dbname": "sage",
"tblname": "userdepartment",
"title":"用户",
"params": {

View File

@ -102,7 +102,8 @@ async def checkUserPassword(request, username, password):
return True
return False
async def basic_auth(sor, auth):
async def basic_auth(sor, request):
auth = request.headers.get('Authentication')
auther = BasicAuth('x')
m = auther.decode(auth)
username = m.login
@ -122,7 +123,7 @@ async def getAuthenticationUserid(sor, request):
return None
for h,f in registered_auth_methods.items():
if auth.startswith(h):
return await f(auth)
return await f(sor, request)
return None
async def objcheckperm(obj, request, userid, path):