From 9f852a739e0bcb55bd1753247ae5669bca1e8d6f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 21 Jan 2025 13:44:45 +0800 Subject: [PATCH] bugfix --- wwwroot/.DS_Store | Bin 8196 -> 0 bytes wwwroot/add_adminuser.dspy | 23 ----------------- wwwroot/userpassword_login.dspy | 11 -------- wwwroot/userpassword_login.ui | 43 -------------------------------- 4 files changed, 77 deletions(-) delete mode 100644 wwwroot/.DS_Store delete mode 100644 wwwroot/add_adminuser.dspy delete mode 100644 wwwroot/userpassword_login.dspy delete mode 100644 wwwroot/userpassword_login.ui diff --git a/wwwroot/.DS_Store b/wwwroot/.DS_Store deleted file mode 100644 index bc880728d7a53c862e9f79c1591157c7dd3028e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHMO>h)N6z*>l!VDS61QrM@VHcuO!V1X(fe7g44-LPmY(joOmff8ZrkI@xJG&b+ zqESy4QvQ{eWvN%CP!5(_f|edE6g_xQ{K2w3SZZ1RA1qHEd_6tO&n9@X{A0Rm`t^I= zuczPZ@6FrpWsIStsJAfIz!;P1;Z&=oYKp@9`7^0VzNCgINT0c*8OzBKcQP|NX>=e6 zJP>#w@Ic^!zypB?{tX_WoXv}TnY=H0gF5g);DIaB1N{3CrH9jmPbUQRJ{?qfM*yPL zB=!omHQpc^^=ZPV6M|9?6$n+LLKXfI145nTQGZ;*rxSt-bq4?N0sqbLPbl!-PV+~- z;S32ugF5g);DN~=;Ai(Lrn4N&WyUT(zgwnTXm0)(QdRY|n(6X%xmLb4x!)N}7Se^H z+mX)i;#|MuSebG=o!My`V<|1v>DYy|X&ZS@!PE^JvU||9b!V)@DcZX0=_W;otjJ1A zTQEKzZ;8ia(YEIJ;aGIME#4f9u3pu8_^=|+ZCbg$FLl7m+0GGR0sOB3n^|Ge0~gG( z+)}5wj;LCb85QPyRyIeOQLD}j_YdqGREJaA>=Lbe$7sQHY zLZ>%bO4Ew2(Pz+HX36NH8Qme1Uda_h6{bNsF>C(9#n&ubxw>s*$EMBO&(>-6v(=C~ zZ?IvoG#!S7ie>m-C4O=(ueIw*xyI|gC8hNE2F{R&5=Zv$nwfee-1>x{eF=HMq znuXi7CRrA9Eeb~!?PYnlP7B%Q=v-6xdcupsSIhD)F7M16R12}XG<=<+rR9E?)+?rn zsVfxCRr(LmZVS~Gb(O5?%7B&57?u#Vs_SHJi!xXez81oex^OUgon~*dkJuON8}C!Lr& zlp;6Z(z99J`kx7y6TvQzMIxF+(J9#GmWZlV zQS2$6?wS~}@R_z7R8^~{C=`7+HWJHxrlXUl;V~uuRp>s)zGUCBU)b-2?pc_F1}sH0 zTCst!ydAwrq8|f<=e@`v>tWgT+T5>Mf258KCZ9M9tg zyniedbE0mG$a-nJZjA4xdktC>kTZy$3n z%6g~D*#6tHUU+=GW!2g>v1m)YrR`7B9#3mjE}Qm_Qs;S#DlGLhr>v@kw1J=hyDxwL zKc#LU3_K8c;Q!$PRCgu2I>?stPk~Ca_*pwj&t7_X;o~L*^;D?3j ZPQs@Xf|7*FKXDNNCCL9l{=c&G{~xhG#peJ3 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')}}" - } - } - ] -} -