瞪眼法测试通过
This commit is contained in:
@@ -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 {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user