fix: 集团可给各俱乐部分配不同功能角色,按俱乐部隔离权限校验
This commit is contained in:
@@ -213,6 +213,20 @@ def get_manageable_club_ids(user, permissions=None):
|
||||
}
|
||||
|
||||
|
||||
def can_access_admin_user_management(user, permissions=None):
|
||||
"""
|
||||
是否可访问「后台用户」页(列表、按俱乐部分配功能角色)。
|
||||
系统超管 / 000001 / 集团高管 / 任一俱乐部超管均可。
|
||||
"""
|
||||
if is_system_super_admin(user):
|
||||
return True
|
||||
if permissions and '000001' in permissions:
|
||||
return True
|
||||
if can_manage_admin_assignments(user, permissions):
|
||||
return True
|
||||
return bool(get_manageable_club_ids(user, permissions))
|
||||
|
||||
|
||||
def _pack(scope, club_id, is_group_admin, assignments, clubs, can_switch_club,
|
||||
role_code, role_name):
|
||||
allowed_club_ids = sorted({
|
||||
|
||||
Reference in New Issue
Block a user