bugfix
This commit is contained in:
parent
ebd3765a45
commit
9a454eed85
@ -58,11 +58,14 @@ where a.id = c.userid
|
|||||||
self.ur_caches[userid] = sorted(list(set(roles)))
|
self.ur_caches[userid] = sorted(list(set(roles)))
|
||||||
|
|
||||||
def check_roles_path(self, roles, path):
|
def check_roles_path(self, roles, path):
|
||||||
|
ret = False
|
||||||
for role in roles:
|
for role in roles:
|
||||||
paths = self.rp_caches.get(role)
|
paths = self.rp_caches.get(role)
|
||||||
if not paths:
|
if not paths:
|
||||||
return False
|
continue
|
||||||
return path in paths
|
if path in paths:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user