bugfix
This commit is contained in:
parent
7df34eb74c
commit
bd4af041f3
18
wwwroot/add_superuser.dspy
Normal file
18
wwwroot/add_superuser.dspy
Normal 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"
|
||||||
Loading…
x
Reference in New Issue
Block a user