功能(接单平台): 为普通运营增加杂项配置权限
This commit is contained in:
@@ -35,6 +35,7 @@ export const ADMIN_PERMISSION_KEYS = [
|
||||
'consignment.manage',
|
||||
'consignment.review',
|
||||
'consignment.fulfill',
|
||||
'worker_platform.misc_config',
|
||||
'semi_auto.credential.export',
|
||||
] as const
|
||||
|
||||
|
||||
@@ -4029,3 +4029,18 @@ test('撤单后重派同一打手:旧已取消份额不得把当前接单状
|
||||
'列表映射必须使用排除后的已取消份额兜底',
|
||||
)
|
||||
})
|
||||
|
||||
test('杂项配置权限默认授予管理员和普通运营', () => {
|
||||
const migration = fs.readFileSync(
|
||||
fileURLToPath(
|
||||
new URL(
|
||||
'../../db/migrations/182_worker_platform_misc_config_permission.sql',
|
||||
import.meta.url,
|
||||
),
|
||||
),
|
||||
'utf8',
|
||||
)
|
||||
|
||||
assert.match(migration, /worker_platform\.misc_config/)
|
||||
assert.match(migration, /VALUES \('admin'\), \('operator'\)/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user