diff --git a/wwwroot/.DS_Store b/wwwroot/.DS_Store deleted file mode 100644 index bc88072..0000000 Binary files a/wwwroot/.DS_Store and /dev/null differ diff --git a/wwwroot/add_adminuser.dspy b/wwwroot/add_adminuser.dspy deleted file mode 100644 index 61af0de..0000000 --- a/wwwroot/add_adminuser.dspy +++ /dev/null @@ -1,23 +0,0 @@ -if params_kw.get('password') != params_kw.get('chkpassword'): - return Error(title='add user error', message='password not match') - -ns = params_kw.copy() -ns['id'] = uuid() -await rfexe('passowrd', ns) -user_orgid = await get_userorgid() -ns['orgid'] = user_orgid -dbname = await rfexe('get_module_dbname','rbac') -db = DBPools() -debug(f'{dbname=}') -async with db.sqlorContext(dbname) as sor: - await sor.C('users',ns.copy()) - uid = ns['id'] - ns = { - 'id':uuid(), - 'userid':uid, - 'roleid':'admin' - } - 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') - diff --git a/wwwroot/userpassword_login.dspy b/wwwroot/userpassword_login.dspy deleted file mode 100644 index 883e3f0..0000000 --- a/wwwroot/userpassword_login.dspy +++ /dev/null @@ -1,11 +0,0 @@ -username = params_kw.get('username') -passwd = params_kw.get('passwd') -if not passwd: - return UiError(title='Login failed', message='Password is required') -passwd = password(passwd) -rzt = await check_user_password(request, username, passwd) -if rzt: - return UiMessage(title='Logined', message=f'Welcome back ') -return UiError(title='login failed', message='user and password mismatch') - - diff --git a/wwwroot/userpassword_login.ui b/wwwroot/userpassword_login.ui deleted file mode 100644 index e8933ad..0000000 --- a/wwwroot/userpassword_login.ui +++ /dev/null @@ -1,43 +0,0 @@ -{ - "id":"login_window", - "widgettype":"PopupWindow", - "options":{ - "auto_open":true, - "anthor":"cc", - "cwidth":20, - "cheight":"14" - }, - "subwidgets":[ - { - "widgettype":"Form", - "id":"userpasswd", - "options":{ - "cols":1, - "fields":[ - { - "name":"username", - "label":"用户名", - "uitype":"str" - }, - { - "name":"passwd", - "label":"密码", - "uitype":"password" - } - ] - } - } - ], - "binds":[ - { - "wid":"userpasswd", - "event":"submit", - "actiontype":"urlwidget", - "target":"self", - "options":{ - "url":"{{entire_url('userpassword_login.dspy')}}" - } - } - ] -} -