bugfix
This commit is contained in:
parent
31f9d796ec
commit
1954aa6fa8
@ -33,7 +33,7 @@ order by c.orgtypeid, c.name"""
|
||||
from users a, role b, userrole c
|
||||
where a.id = c.userid
|
||||
and c.roleid = b.id
|
||||
and a.id = ${userid}''', {'userid': userid})
|
||||
and a.id = ${userid}$''', {'userid': userid})
|
||||
roles = ['*.*'] # 登录用户
|
||||
for r in recs:
|
||||
append(f'{r.orgtypeid}.{r.name}')
|
||||
@ -54,6 +54,7 @@ where a.id = c.userid
|
||||
if self.rp_caches is None or not roles:
|
||||
env = ServerEnv()
|
||||
async with get_sor_context(env, 'rbac') as sor:
|
||||
if not self.rp_caches:
|
||||
await self.load_roleperms(sor)
|
||||
if not roles:
|
||||
await self.get_userroles(sor, userid)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user