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: # 无特权:严禁查其他公司,强制绑定本公司