优化
This commit is contained in:
@@ -16395,6 +16395,7 @@ CALL baiyue_iam.assert_overseas_pda_picker_permission();
|
||||
DROP PROCEDURE baiyue_iam.assert_overseas_pda_picker_permission;
|
||||
|
||||
-- 四期仓库后台角色严格最小授权:list 同时覆盖列表与详情,只读角色不得获得任何写权限。
|
||||
USE baiyue_iam;
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp_phase4_warehouse_role_permission;
|
||||
CREATE TEMPORARY TABLE tmp_phase4_warehouse_role_permission (
|
||||
role_code VARCHAR(64) NOT NULL,
|
||||
|
||||
@@ -4,6 +4,7 @@ import { readFileSync } from 'node:fs'
|
||||
|
||||
const acceptance = readFileSync(new URL('./phase3-warehouse-rbac.mjs', import.meta.url), 'utf8')
|
||||
const iamSql = readFileSync(new URL('../../iam/src/main/resources/db/lastleg-permissions.sql', import.meta.url), 'utf8')
|
||||
const unifiedSql = readFileSync(new URL('../../deploy/sql/头程数据库统一增量-MySQL8.sql', import.meta.url), 'utf8')
|
||||
|
||||
const listCodes = [
|
||||
'platform:overseas-warehouse:last-mile-order:list',
|
||||
@@ -37,3 +38,11 @@ test('picker stays isolated to the dedicated overseas PDA authority', () => {
|
||||
assert.match(iamSql, /role\.role_code='WAREHOUSE_PICKER'/)
|
||||
assert.match(iamSql, /permission\.permission_code='lastleg:pda:operate'/)
|
||||
})
|
||||
|
||||
test('unified migration creates the phase-four role matrix in the IAM schema used by its assertion routine', () => {
|
||||
assert.match(
|
||||
unifiedSql,
|
||||
/USE baiyue_iam;\s*DROP TEMPORARY TABLE IF EXISTS tmp_phase4_warehouse_role_permission;\s*CREATE TEMPORARY TABLE tmp_phase4_warehouse_role_permission/,
|
||||
)
|
||||
assert.match(unifiedSql, /CREATE PROCEDURE baiyue_iam\.assert_phase4_warehouse_role_minimum\(\)/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user