fix: role authentication (#3263)

This commit is contained in:
shaohuzhang1 2025-06-16 14:05:08 +08:00 committed by GitHub
parent 2782a7720c
commit 1ea78ea0c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,7 +34,7 @@ def exist_role_by_role_constants(user_role: List[RoleConstants],
:param role_list: 需要拥有的角色
:return: 是否拥有
"""
return any(list(map(lambda up: role_list.__contains__(up), user_role)))
return any([True for role in role_list if user_role.__contains__(role.value.__str__())])
def exist_permissions_by_view_permission(user_role: List[RoleConstants],