fix(M09-REGRESSION): 完成商品逐单对账与权限收口
This commit is contained in:
@@ -338,6 +338,13 @@ await assert.rejects(
|
||||
() => service.listStocks(scopedOut, { storeId: '11', page: 1, pageSize: 20 }),
|
||||
(error) => error instanceof InventoryError && error.code === 'INVENTORY_STORE_SCOPE_FORBIDDEN'
|
||||
);
|
||||
const platformManager = {
|
||||
...manager,
|
||||
access: { roles: ['STAFF'], capabilities: ['platform.manage'], storeIds: [] }
|
||||
};
|
||||
assert.equal((await service.listStocks(
|
||||
platformManager, { storeId: '11', page: 1, pageSize: 20 }
|
||||
)).total, 4, 'platform.manage must bypass store grants for inventory reads');
|
||||
|
||||
state.lockOrder.length = 0;
|
||||
const batchBase = {
|
||||
|
||||
Reference in New Issue
Block a user