feat: harden enterprise control plane
This commit is contained in:
@@ -27,33 +27,60 @@ test("independent Boss admin web app uses the backoffice BFF with cookie session
|
||||
assert.match(apiSource, /\/api\/v1\/admin\/access/);
|
||||
assert.match(apiSource, /\/api\/v1\/admin\/risks\/actions/);
|
||||
assert.match(apiSource, /\/api\/v1\/admin\/skills\/requests/);
|
||||
assert.match(apiSource, /\/api\/v1\/admin\/backups/);
|
||||
assert.match(apiSource, /credentials:\s*["']include["']/);
|
||||
assert.match(apiSource, /menuTree/);
|
||||
assert.match(apiSource, /tenants/);
|
||||
assert.match(apiSource, /resourceGroups/);
|
||||
for (const fn of ["postAdminAccess", "postRiskAction", "postSkillLifecycleRequest"]) {
|
||||
for (const fn of ["postAdminAccess", "postRiskAction", "postSkillLifecycleRequest", "fetchAdminBackups", "createAdminBackup", "restoreAdminBackup"]) {
|
||||
assert.match(apiSource, new RegExp(`function\\s+${fn}|const\\s+${fn}`));
|
||||
}
|
||||
for (const action of ["create_snapshot", "restore_snapshot"]) {
|
||||
assert.match(apiSource, new RegExp(action));
|
||||
}
|
||||
});
|
||||
|
||||
test("independent Boss admin web app includes enterprise management sections", async () => {
|
||||
const appSource = await readSource("../apps/boss-admin-web/src/App.vue");
|
||||
|
||||
for (const label of [
|
||||
"Boss 企业后台",
|
||||
"工作台",
|
||||
"租户管理",
|
||||
"账号管理",
|
||||
"角色权限",
|
||||
"资源授权",
|
||||
"Boss 平台总后台",
|
||||
"企业管理后台",
|
||||
"平台总览",
|
||||
"企业开通",
|
||||
"客户与套餐",
|
||||
"全局设备",
|
||||
"客户成功",
|
||||
"全局风险",
|
||||
"服务连接状态",
|
||||
"最近开通企业",
|
||||
"开通预览",
|
||||
"交付检查",
|
||||
"客户健康列表",
|
||||
"风险聚合",
|
||||
"客户成功跟进记录",
|
||||
"企业总览",
|
||||
"组织与成员",
|
||||
"设备与项目",
|
||||
"Agent 与流程",
|
||||
"Skill 中心",
|
||||
"风险告警",
|
||||
"审计日志",
|
||||
"风险与审计",
|
||||
"备份与回退",
|
||||
"经营目标",
|
||||
"部门进展",
|
||||
"主 Agent 摘要",
|
||||
"组织结构",
|
||||
"权限详情",
|
||||
"使用审计",
|
||||
"业务级回退",
|
||||
]) {
|
||||
assert.match(appSource, new RegExp(label));
|
||||
}
|
||||
assert.match(appSource, /adminSurface/);
|
||||
assert.match(appSource, /setSurface/);
|
||||
assert.match(appSource, /menuTree/);
|
||||
assert.match(appSource, /workbench/);
|
||||
assert.match(appSource, /platform-overview/);
|
||||
assert.match(appSource, /enterprise-overview/);
|
||||
assert.match(appSource, /tenants/);
|
||||
});
|
||||
|
||||
@@ -76,6 +103,9 @@ test("independent Boss admin web app exposes management actions instead of read
|
||||
"关闭风险",
|
||||
"创建工单",
|
||||
"创建 Skill 请求",
|
||||
"创建状态快照",
|
||||
"恢复到此快照",
|
||||
"快照清单",
|
||||
]) {
|
||||
assert.match(appSource, new RegExp(label));
|
||||
}
|
||||
@@ -94,6 +124,10 @@ test("independent Boss admin web app exposes management actions instead of read
|
||||
]) {
|
||||
assert.match(appSource, new RegExp(action));
|
||||
}
|
||||
assert.match(appSource, /backupSnapshots/);
|
||||
assert.match(appSource, /loadBackupSnapshots/);
|
||||
assert.match(appSource, /createAdminBackup/);
|
||||
assert.match(appSource, /restoreAdminBackup/);
|
||||
});
|
||||
|
||||
test("root Next project isolates the independent Vue admin workspace", async () => {
|
||||
|
||||
Reference in New Issue
Block a user