This commit is contained in:
yumoqing 2026-03-20 22:30:47 +08:00
parent 768e97f50e
commit 814d11a822

View File

@ -39,6 +39,13 @@ async def main():
perms = await sor.sqlExe("select * from permission where path like ${path}$", {'path': path})
else:
perms = await sor.R('permission', {'path': path})
if len(perms) < 1:
perms = [ DictObject(**{
'id': getID(),
'path': path
}) ]
await sor.C('permission', perms[0].copy())
if role in ['anonymous', 'logined']:
for p in perms:
await add_roleperm(sor, role, p.id)