优化客服权限

This commit is contained in:
yml2213
2026-07-10 12:00:23 +08:00
parent 763f5034fd
commit ca5433ada4
18 changed files with 467 additions and 120 deletions
@@ -39,6 +39,13 @@ test('canViewerCloseTask allows support to close active task but not redeemed ta
assert.equal(canViewerCloseTask({ task_status: 'redeemed' }, viewerContext), false)
})
test('createAdminViewerContext lets support operate vouchers without lifecycle permissions', () => {
const viewerContext = createAdminViewerContext({ role: 'support' })
assert.equal(viewerContext.canOperateKuaishouIndustryVoucher, true)
assert.equal(viewerContext.canManageTaskLifecycle, false)
})
test('mapKuaishouCloudFulfillmentContext exposes cloud account display labels', () => {
const flow = mapKuaishouCloudFulfillmentContext(
{