From 0daf50ac21e6edf766ea2e389788a40b2824e0f4 Mon Sep 17 00:00:00 2001 From: yueli Date: Fri, 4 Sep 2026 13:01:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=88=90=E5=93=81/=E5=8D=8A=E6=88=90?= =?UTF-8?q?=E5=93=81/=E7=BB=B4=E4=BF=AE=E5=88=97=E8=A1=A8=E7=AC=AC?= =?UTF-8?q?=E4=BA=8C=E5=B1=82=E8=B7=A8=E5=9F=9F=E5=88=A4=E6=96=AD=E8=A1=A5?= =?UTF-8?q?=E8=AE=A4=20crossDomain=EF=BC=88=E8=A7=A3=E5=86=B3=E5=BA=93?= =?UTF-8?q?=E7=AE=A1=E9=85=8D=E8=B7=A8=E5=9F=9F=E4=BB=8D=E7=9C=8B=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E5=8F=8C=E8=BE=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inventory-backend/app/services/inbound/product_service.py | 4 ++-- inventory-backend/app/services/inbound/repair_service.py | 4 ++-- inventory-backend/app/services/inbound/semi_service.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/inventory-backend/app/services/inbound/product_service.py b/inventory-backend/app/services/inbound/product_service.py index 036582a..530a870 100644 --- a/inventory-backend/app/services/inbound/product_service.py +++ b/inventory-backend/app/services/inbound/product_service.py @@ -402,8 +402,8 @@ class ProductInboundService: user_perms = get_current_user_permissions() or [] normalized_perms = set(p.lower().replace('_', '').replace(':', '') for p in user_perms) - # 检查是否拥有全局特权或超管角色 - has_cross_company = 'globalcrosscompanyop' in normalized_perms + # 检查是否拥有全局特权或超管角色(crossDomain 与 global:cross_company_op 都视为跨域) + has_cross_company = 'globalcrosscompanyop' in normalized_perms or 'crossdomain' in normalized_perms if user_role != 'SUPER_ADMIN' and not has_cross_company: # 无特权:严禁查其他公司,强制绑定本公司 diff --git a/inventory-backend/app/services/inbound/repair_service.py b/inventory-backend/app/services/inbound/repair_service.py index 1c4a690..df91da1 100644 --- a/inventory-backend/app/services/inbound/repair_service.py +++ b/inventory-backend/app/services/inbound/repair_service.py @@ -106,8 +106,8 @@ class RepairInboundService: user_perms = get_current_user_permissions() or [] normalized_perms = set(p.lower().replace('_', '').replace(':', '') for p in user_perms) - # 检查是否拥有全局特权或超管角色 - has_cross_company = 'globalcrosscompanyop' in normalized_perms + # 检查是否拥有全局特权或超管角色(crossDomain 与 global:cross_company_op 都视为跨域) + has_cross_company = 'globalcrosscompanyop' in normalized_perms or 'crossdomain' in normalized_perms # 维修表需要通过 base_id 关联 MaterialBase 进行公司过滤 if user_role != 'SUPER_ADMIN' and not has_cross_company: diff --git a/inventory-backend/app/services/inbound/semi_service.py b/inventory-backend/app/services/inbound/semi_service.py index 1814ee8..e4d95b6 100644 --- a/inventory-backend/app/services/inbound/semi_service.py +++ b/inventory-backend/app/services/inbound/semi_service.py @@ -494,8 +494,8 @@ class SemiInboundService: user_perms = get_current_user_permissions() or [] normalized_perms = set(p.lower().replace('_', '').replace(':', '') for p in user_perms) - # 检查是否拥有全局特权或超管角色 - has_cross_company = 'globalcrosscompanyop' in normalized_perms + # 检查是否拥有全局特权或超管角色(crossDomain 与 global:cross_company_op 都视为跨域) + has_cross_company = 'globalcrosscompanyop' in normalized_perms or 'crossdomain' in normalized_perms if user_role != 'SUPER_ADMIN' and not has_cross_company: # 无特权:严禁查其他公司,强制绑定本公司