fix: 恢复全局角色权限校验,修复商家订单403

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-06 18:36:39 +08:00
parent 64ddb7d0b8
commit df6c6912d9
3 changed files with 15 additions and 8 deletions

View File

@@ -56,7 +56,7 @@ from orders.utils import (
from backend.utils import (
update_dashou_daily_by_action, update_guanshi_daily_by_action,
update_shangjia_daily, update_zuzhang_daily_by_action,
verify_kefu_permission
verify_kefu_permission, has_perm_code,
)
from rank.utils import get_tag_fee, create_shenhe_jilu, validate_shenheguan
@@ -136,7 +136,7 @@ class KefuGetOrderListView(APIView):
return permissions
# 3. 检查平台订单管理权限002ab
if '002ab' not in permissions:
if not has_perm_code(permissions, '002ab'):
return Response({'code': 403, 'msg': '您无权查看平台订单列表'})
# 4. 获取分页和筛选参数
@@ -304,8 +304,8 @@ class KefuGetShangjiaOrderListView(APIView):
if kefu is None:
return permissions
# 3. 检查商家订单管理权限(使用 002ac,如果没有可改用 002ab
if '002ac' not in permissions:
# 3. 检查商家订单管理权限002ac
if not has_perm_code(permissions, '002ac'):
return Response({'code': 403, 'msg': '您无权查看商家订单列表'})
# 4. 获取分页和筛选参数