From 7ed44525d16bb521945e083b7c72c28ecd69e809 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 20 Mar 2026 20:49:05 +0800 Subject: [PATCH] bugfic --- rbac/userperm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rbac/userperm.py b/rbac/userperm.py index 01ea638..2f78f35 100644 --- a/rbac/userperm.py +++ b/rbac/userperm.py @@ -34,7 +34,7 @@ from users a, role b, userrole c where a.id = c.userid and c.roleid = b.id and a.id = ${userid}$''', {'userid': userid}) - roles = ['*.*'] # 登录用户 + roles = ['any', '*.*'] # 登录用户 for r in recs: roles.append(f'{r.orgtypeid}.{r.name}') roles.append(f'{r.orgtypeid}.*') @@ -51,7 +51,7 @@ where a.id = c.userid async def is_user_has_path_perm(self, userid, path): roles = self.ur_caches.get(userid) if userid is None: - roles = ['anonymous'] + roles = ['any', 'anonymous'] if self.rp_caches is None or not roles: env = ServerEnv()