From 1358412085121d2630783f7e01831fc328f064fa Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 10 Nov 2024 13:26:34 +0800 Subject: [PATCH] bugfix --- models/orgtype_roles.xlsx | Bin 16471 -> 0 bytes script/init.py | 166 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) delete mode 100644 models/orgtype_roles.xlsx create mode 100644 script/init.py diff --git a/models/orgtype_roles.xlsx b/models/orgtype_roles.xlsx deleted file mode 100644 index 5a1ce55368169aaa691932689897e0bd4607ce34..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16471 zcmeIZb97zp);=8DYK+E>ZQHgQ+qTizw(X>G8rzNCSPdHU+wF6HZ=ciioH4%t-*;zZ z?Y+ic_qF%F*W@+ll$QbpLj!^Uf&u~pA_6k2l+cX@1_Gi4oT36jfoKWY+Bg~8IO!?7 z+Zj9R(7IV$5$1z|P~-xE0IvVP$N%CT7*|=B?WITSV!Omk-bk)FGZAJ z=v%05l9>|NKI5U1j07GB`Lt%GvHIgBvuG1*ojRSMsLE2=$Zzf(Ij2=23UxF%V_VeFgEh-u)2o%se;!~eX>zJWkno<<04M-;u zLUwM*V@#r`OO_2F?abgw&vz8>`t*!Zk)j%kIJ9#vD((ro>tzTc!zP`pzP*=Ncd~$) zu1;lx%gRH{WmX0H`ZWzP1gj4gsg427f!Nd!yFJdQb+m;Mrf<}Z+wepSb0zDny6ZUm z-W9BX$X(SRU!`wjFF%=pcARW-qJEuFM+;Rek!5trcAe{fM?dj$p074`K@aSEsi7SS z=VXlV&_LW_3pWa0pYNsJ?+M%zQC;j z$!9g_YRJ_;!y;b>1#SK%`hrPU|8{Y8BZ}~yAq;Gzh z&SI(q0X(hR=IrW84w#zPl8EJ`+DUtOA)DCp6U+mX;!s?Up!vM_9SY%(?GV;;66 zMZ{FG#ln-Z8uziwg2z8t@>TPSNP230MvuZqpWYjS;*)E>a`mUvkdL7VrFd~+y+t7{V-!atj7*489v7t#CEyi>StA~*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MUvXLQ!HcmJ8e;RzcQ*9axBE^ko59dDDb5~Fk+ zDy!HidDcqA7Bh=MaHAdf-ILDrHlUO9S!$e&vWPORnnIt%aAyST5{lw!EhVSm88GMY zpKiK)_($+2V8<^283{Sy89?IN0qPn~#turxPEJ1y9DklO&>EQAoW`xg04tyccNb9Z zE`Yj$5b;HE&1gp?MwCfBNMQBJw_IaqPqf!gCSExbx5hiJn4UG<@m4e}-i9qPnM(QN zql!j454JfUZINP9bt?x)@zL#I9!PIM(+)KfjZvyiL^2d&6)OsQ3Pv1{jZJ|j&(KEf zPiAASGGAiVO89ie`4Sq@Sk=vbFI}w~S38KKmwwDV`o3N^o5BYeenhWJ#cyCsT9KH% z61l>++?bg!k%m`m7nJbPI7ETMVN7Xz=6`FE8IvVeMih~uGrAOUepB`Z_fhkw0_?zF zdjt$Z11R_W^Yra+0sZUMKg{CFOZ_{*zfb-B9bg3Df%HU5e4XA$N%LITNO2>(-(`E%)?Z0zr)0~CM$gn#5_{{;M#-24qVMENJ+ zFKPKjb^eL+CqMEVWt8S0QGT%{f1><*`tchB2&j$`2 0: + return + await sor.C('organization',{'id':'0'}) + await sor.C('orgtypes', {'id':getID(), 'orgid':'0', 'orgtypeid':'owner'}) + await sor.C('orgtypes', {'id':getID(), 'orgid':'0', 'orgtypeid':'reseller'}) + roleid = '' + for orgtype, roles in type_roles.items(): + for r in roles: + id = getID() + await sor.C('role', {'id':id,'orgtypeid':orgtype,'name':r}) + if orgtype == 'owner' and r == 'superuser': + roleid = id + ns = { + 'id':getID(), + 'username':'superuser', + 'orgid':'0', + 'password':passwd + } + await sor.C('users', ns) + ns1 = { + 'id':getID(), + 'userid':ns['id'], + 'roleid':roleid + } + await sor.C('userrole', ns1) + await init_perms(sor) + +async def add_permissions(): + root = os.path.abspath('../wwwroot') + for f in listFile(root, rescursive=True): + cnt = len(root) + pth = f[cnt:] + print(f'{f=},{root=},{pth=}, {cnt=}') + act = True + for f in av_folders: + if pth.startswith(f): + act = False + break + if act: + await insert_perm(pth) + +async def main(passwd): + await add_permissions() + await init_rbac(passwd) +if __name__ == '__main__': + if len(sys.argv) < 2: + print(f'Usage:\n{sys.argv[0]} super_user_passwd\n') + sys.exit(1) + supassword = sys.argv[1] + DBPools(databases) + asyncio.get_event_loop().run_until_complete(main(supassword)) +