From 9a454eed85dc6982f665928a6bd1886fbd5d3d31 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 20 Mar 2026 21:44:37 +0800 Subject: [PATCH] bugfix --- rbac/userperm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rbac/userperm.py b/rbac/userperm.py index 99a33ce..5910b2e 100644 --- a/rbac/userperm.py +++ b/rbac/userperm.py @@ -58,11 +58,14 @@ where a.id = c.userid self.ur_caches[userid] = sorted(list(set(roles))) def check_roles_path(self, roles, path): + ret = False for role in roles: paths = self.rp_caches.get(role) if not paths: - return False - return path in paths + continue + if path in paths: + return True + return False async def is_user_has_path_perm(self, userid, path): roles = self.ur_caches.get(userid)