fix: 「用户与角色」模块切换到 FBA UI 承载(Epic #159 遗漏收尾)
This commit is contained in:
+13
-3
@@ -62,8 +62,11 @@ var IAOP_SESSION = (function () {
|
||||
{ key: "audit", title: "审计查询", hash: "#audit" }
|
||||
] },
|
||||
{ key: "users", title: "用户与角色", icon: "👤", url: "auth/users.html",
|
||||
desc: "用户管理、角色分配(readonly / engineer / admin)、审计(PRD 8.2)",
|
||||
roles: ["admin"], tag: "管理员", tagColor: "gold" },
|
||||
desc: "用户管理、角色分配、菜单授权(Epic #159 起由 FBA UI 承载)",
|
||||
roles: ["admin"], tag: "管理员", tagColor: "gold",
|
||||
/* FBA 模式下该模块由 FBA UI(/fba-admin/)承载,新标签打开;
|
||||
* fbaUrl 由 menuTree() 在 FBA 轨道生效时注入 */
|
||||
fbaUrl: "/fba-admin/" },
|
||||
{ key: "mobile", title: "移动端驾驶舱", icon: "📱", url: "mobile/",
|
||||
desc: "移动端只读驾驶舱与交接班摘要(iOS14+ / Android 10+)",
|
||||
roles: ["readonly", "engineer", "admin"], tag: "移动端", tagColor: "default" }
|
||||
@@ -441,7 +444,14 @@ var IAOP_SESSION = (function () {
|
||||
return copy;
|
||||
});
|
||||
// 服务端树里没有任何 iAOP 模块(未播种)→ 本地角色过滤兜底
|
||||
return mods.length ? mods : modulesFor(user.role);
|
||||
if (!mods.length) return modulesFor(user.role);
|
||||
// FBA 轨道生效:带 fbaUrl 的模块(用户与角色)指向 FBA UI,新标签打开
|
||||
return mods.map(function (m) {
|
||||
if (m.fbaUrl) {
|
||||
return Object.assign({}, m, { url: m.fbaUrl, external: true });
|
||||
}
|
||||
return m;
|
||||
});
|
||||
})
|
||||
.catch(function () { return modulesFor(user.role); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user