bugfic
This commit is contained in:
parent
8ed0cb9c49
commit
7ed44525d1
@ -34,7 +34,7 @@ from users a, role b, userrole c
|
|||||||
where a.id = c.userid
|
where a.id = c.userid
|
||||||
and c.roleid = b.id
|
and c.roleid = b.id
|
||||||
and a.id = ${userid}$''', {'userid': userid})
|
and a.id = ${userid}$''', {'userid': userid})
|
||||||
roles = ['*.*'] # 登录用户
|
roles = ['any', '*.*'] # 登录用户
|
||||||
for r in recs:
|
for r in recs:
|
||||||
roles.append(f'{r.orgtypeid}.{r.name}')
|
roles.append(f'{r.orgtypeid}.{r.name}')
|
||||||
roles.append(f'{r.orgtypeid}.*')
|
roles.append(f'{r.orgtypeid}.*')
|
||||||
@ -51,7 +51,7 @@ where a.id = c.userid
|
|||||||
async def is_user_has_path_perm(self, userid, path):
|
async def is_user_has_path_perm(self, userid, path):
|
||||||
roles = self.ur_caches.get(userid)
|
roles = self.ur_caches.get(userid)
|
||||||
if userid is None:
|
if userid is None:
|
||||||
roles = ['anonymous']
|
roles = ['any', 'anonymous']
|
||||||
|
|
||||||
if self.rp_caches is None or not roles:
|
if self.rp_caches is None or not roles:
|
||||||
env = ServerEnv()
|
env = ServerEnv()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user