This commit is contained in:
yumoqing 2026-03-21 11:41:03 +08:00
parent 3d38d97676
commit b7c71bda18

View File

@ -1104,10 +1104,11 @@ async def add_roleperm(sor, roleid, permid):
async def add_roles_perm(perm, roles): async def add_roles_perm(perm, roles):
perms = [perm] perms = [perm]
for role in roles:
if role in ['anonymous', 'any', 'logined']: if role in ['anonymous', 'any', 'logined']:
for p in perms: for p in perms:
await add_roleperm(sor, role, p.id) await add_roleperm(sor, role, p.id)
return continue
orgtypeid, name = role.split('.') orgtypeid, name = role.split('.')
ns = { ns = {
'orgtypeid': orgtypeid, 'orgtypeid': orgtypeid,