This commit is contained in:
yumoqing 2025-08-07 14:12:35 +08:00
parent 7df34eb74c
commit bd4af041f3

View File

@ -0,0 +1,18 @@
db = DBPools()
dbname = get_module_dbname('rbac')
async with db.sqlorContext(dbname) as sor:
ns = {
"id": uuid(),
"username":"superuser",
"password":password_encode('111111'),
"orgid":"0"
}
roles = [
{
"orgtypeid":"owner",
"role":["superuser", "admin"]
}
]
await create_user(ns, roles)
return "OK"
return "Error"