bugfix
This commit is contained in:
parent
292dd7c796
commit
5208a12eff
@ -4,10 +4,12 @@ if params_kw.get('password') != params_kw.get('chkpassword'):
|
|||||||
ns = params_kw.copy()
|
ns = params_kw.copy()
|
||||||
ns['id'] = uuid()
|
ns['id'] = uuid()
|
||||||
await rfexe('passowrd', ns)
|
await rfexe('passowrd', ns)
|
||||||
user_orgid = await get_user_orgid()
|
user_orgid = await get_userorgid()
|
||||||
ns['orgid'] = user_orgid
|
ns['orgid'] = user_orgid
|
||||||
dbname = rfexe('get_module_dbname','rbac')
|
dbname = await rfexe('get_module_dbname','rbac')
|
||||||
async db.sqlorConext(dbname) as sor:
|
db = DBPools()
|
||||||
|
debug(f'{dbname=}')
|
||||||
|
async with db.sqlorContext(dbname) as sor:
|
||||||
await sor.C('users',ns.copy())
|
await sor.C('users',ns.copy())
|
||||||
uid = ns['id']
|
uid = ns['id']
|
||||||
ns = {
|
ns = {
|
||||||
@ -16,4 +18,6 @@ async db.sqlorConext(dbname) as sor:
|
|||||||
'roleid':'admin'
|
'roleid':'admin'
|
||||||
}
|
}
|
||||||
await sor.C('userrole', ns.copy())
|
await sor.C('userrole', ns.copy())
|
||||||
|
return UiMesage(title='Success', message='admin user added')
|
||||||
|
return UiError(title='Error', message='Error happened when add admin user')
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"options":{
|
"options":{
|
||||||
"archor":"cc",
|
"archor":"cc",
|
||||||
"cwidth":16,
|
"cwidth":16,
|
||||||
"chegith":10
|
"chegith":10,
|
||||||
"title":"add admin user"
|
"title":"add admin user"
|
||||||
},
|
},
|
||||||
"subwidgets":[
|
"subwidgets":[
|
||||||
|
Loading…
Reference in New Issue
Block a user