fix: 恢复全局角色权限校验,修复商家订单403
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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. 获取分页和筛选参数
|
||||
|
||||
Reference in New Issue
Block a user