diff --git a/backend/utils.py b/backend/utils.py index 4764fb0..ba465bc 100644 --- a/backend/utils.py +++ b/backend/utils.py @@ -131,8 +131,8 @@ def verify_kefu_permission(request, username_from_frontend=None): except Exception: permissions = [] - # 超级用户自动拥有所有权限 - if current_user.IsSuperuser and '000001' not in permissions: + # 管理员/超级用户自动拥有所有权限 + if is_admin and '000001' not in permissions: permissions.insert(0, '000001') # 拥有 000001(超级管理权限)的用户自动获得所有功能权限