瞪眼法测试通过

This commit is contained in:
Kyaru
2026-06-25 21:18:13 +08:00
parent b9266dfc1f
commit 67c9330659
11 changed files with 919 additions and 49 deletions

View File

@@ -39,10 +39,10 @@ function getDataScope(user, resource) {
case 'contracts':
if (roleName === 'finance') return {}
if (roleName === 'procurement_manager') {
return { where: 'c.type = ?', values: ['supply'] }
return { where: 'type = ?', values: ['supply'] }
}
if (roleName === 'franchise_manager' || roleName === 'operations_manager') {
return { where: 'c.responsible_user_id = ? AND c.type = ?', values: [userId, 'franchise'] }
return { where: 'responsible_user_id = ? AND type = ?', values: [userId, 'franchise'] }
}
return {}