feat: register_user 添加 customer.admin 角色,注册时同时分配 customer 和 admin 权限

This commit is contained in:
yumoqing 2026-05-31 10:38:32 +08:00
parent c9dd80a484
commit 26d1fd1447
2 changed files with 8 additions and 2 deletions

View File

@ -119,7 +119,13 @@ async def register_user(sor, ns):
ns.login_fail_count = 0
ns1 = DictObject(id=id, orgname=ns.username)
await create_org(sor, ns1)
await create_user(sor, ns)
roles = [
{
'orgtypeid': 'customer',
'roles': ['customer', 'admin']
}
]
await create_user(sor, ns, roles)
return {
"status": "ok",
"data": {

View File

@ -1,7 +1,7 @@
{
"widgettype": "VBox",
"options": {
"cheight": 40,
"css": "filler", "height": "100%",
"width": "100%"
},
"subwidgets": [