Skip to content

Commit 6a6088d

Browse files
committed
fix: role authentication
1 parent 8fd4541 commit 6a6088d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/common/auth/authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def exist_role_by_role_constants(user_role: List[RoleConstants],
3434
:param role_list: 需要拥有的角色
3535
:return: 是否拥有
3636
"""
37-
return any(list(map(lambda up: role_list.__contains__(up), user_role)))
37+
return any([True for role in role_list if user_role.__contains__(role.value.__str__())])
3838

3939

4040
def exist_permissions_by_view_permission(user_role: List[RoleConstants],

0 commit comments

Comments
 (0)