开放客服 kuaishou-lewan 换绑角色权限
与刷新角色一致,换绑改用 canOperateAssistedTask, 不开放重试/发货/退号等完整任务生命周期能力。
This commit is contained in:
@@ -43,9 +43,23 @@ test('createAdminViewerContext lets support operate vouchers without lifecycle p
|
||||
const viewerContext = createAdminViewerContext({ role: 'support' })
|
||||
|
||||
assert.equal(viewerContext.canOperateKuaishouIndustryVoucher, true)
|
||||
assert.equal(viewerContext.canOperateAssistedTask, true)
|
||||
assert.equal(viewerContext.canManageTaskLifecycle, false)
|
||||
})
|
||||
|
||||
test('createAdminViewerContext lets support rebind-assisted actions without full lifecycle', () => {
|
||||
const support = createAdminViewerContext({ role: 'support' })
|
||||
const operator = createAdminViewerContext({ role: 'operator' })
|
||||
|
||||
// 客服:可协助换绑/刷新角色,不可管理任务生命周期(重试/发货/退号等)
|
||||
assert.equal(support.canOperateAssistedTask, true)
|
||||
assert.equal(support.canManageTaskLifecycle, false)
|
||||
|
||||
// 运营:两者皆可
|
||||
assert.equal(operator.canOperateAssistedTask, true)
|
||||
assert.equal(operator.canManageTaskLifecycle, true)
|
||||
})
|
||||
|
||||
test('mapKuaishouCloudFulfillmentContext exposes cloud account display labels', () => {
|
||||
const flow = mapKuaishouCloudFulfillmentContext(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user