feat: register_user 添加 customer.admin 角色,注册时同时分配 customer 和 admin 权限
This commit is contained in:
parent
c9dd80a484
commit
26d1fd1447
@ -119,7 +119,13 @@ async def register_user(sor, ns):
|
|||||||
ns.login_fail_count = 0
|
ns.login_fail_count = 0
|
||||||
ns1 = DictObject(id=id, orgname=ns.username)
|
ns1 = DictObject(id=id, orgname=ns.username)
|
||||||
await create_org(sor, ns1)
|
await create_org(sor, ns1)
|
||||||
await create_user(sor, ns)
|
roles = [
|
||||||
|
{
|
||||||
|
'orgtypeid': 'customer',
|
||||||
|
'roles': ['customer', 'admin']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
await create_user(sor, ns, roles)
|
||||||
return {
|
return {
|
||||||
"status": "ok",
|
"status": "ok",
|
||||||
"data": {
|
"data": {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "VBox",
|
"widgettype": "VBox",
|
||||||
"options": {
|
"options": {
|
||||||
"cheight": 40,
|
"css": "filler", "height": "100%",
|
||||||
"width": "100%"
|
"width": "100%"
|
||||||
},
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user