fix: 借库记录签名改回 null(始终可见),暂等 sys_element 补齐权限码
This commit is contained in:
@ -47,11 +47,8 @@ def filter_item_by_permissions(item_dict, user_permissions, prefix='op_records')
|
|||||||
|
|
||||||
★ Fail-Closed: 字段映射默认为完整列表,不再为空字典。
|
★ Fail-Closed: 字段映射默认为完整列表,不再为空字典。
|
||||||
"""
|
"""
|
||||||
# 仅过滤敏感字段(签名),基础字段在 sys_element 补齐前不过滤
|
# sys_element 补齐前不做字段级过滤
|
||||||
field_to_perm = {
|
field_to_perm = {}
|
||||||
'borrow_signature': f'{prefix}:borrow_signature',
|
|
||||||
'return_signature': f'{prefix}:return_signature',
|
|
||||||
}
|
|
||||||
if '*' in user_permissions or f'{prefix}:*' in user_permissions:
|
if '*' in user_permissions or f'{prefix}:*' in user_permissions:
|
||||||
return item_dict
|
return item_dict
|
||||||
for field, perm_code in field_to_perm.items():
|
for field, perm_code in field_to_perm.items():
|
||||||
|
|||||||
@ -183,9 +183,9 @@ const permissionMap: Record<string, string | null> = {
|
|||||||
status: null,
|
status: null,
|
||||||
expected_return_time: null,
|
expected_return_time: null,
|
||||||
return_location: null,
|
return_location: null,
|
||||||
// 签名列 — 需要权限
|
// 签名列 — 始终可见(sys_element 补齐后再改为显式权限码)
|
||||||
borrow_signature: 'op_records:borrow_signature',
|
borrow_signature: null,
|
||||||
return_signature: 'op_records:return_signature',
|
return_signature: null,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查列权限
|
// 检查列权限
|
||||||
|
|||||||
Reference in New Issue
Block a user