diff --git a/deploy/fba/seed_iaop_menus.py b/deploy/fba/seed_iaop_menus.py index a138e5c..27ec582 100644 --- a/deploy/fba/seed_iaop_menus.py +++ b/deploy/fba/seed_iaop_menus.py @@ -65,6 +65,9 @@ ROLE_MENUS = { # admin 角色额外分配:FBA 原生管理菜单(存在即分配) FBA_ADMIN_MENUS = ["system", "monitor", "log", "scheduler"] +# 退役菜单(issue #174 [B8]):旧 #161 版注册的 users/mobile 改为隐藏(display=0),保留数据 +LEGACY_HIDE = ["users", "mobile"] + class FbaClient: def __init__(self, base: str, username: str, password: str): @@ -184,6 +187,20 @@ def main(): component=m.get("component"), icon=m.get("icon")) print(f"[ok] 菜单:新建 {created},更新 {updated}") + # issue #174 [B8]:退役菜单隐藏(users/mobile,旧 #161 版残留) + for legacy in LEGACY_HIDE: + if legacy in existing: + mid = existing[legacy] + cli.put(f"/sys/menus/{mid}", { + "title": legacy, "name": legacy, + "path": f"/iaop/{legacy}", "parent_id": None, "sort": 99, + "icon": None, "type": 1, "component": None, + "perms": f"iaop:{legacy}", "status": 1, + "display": 0, "cache": 0, "link": None, + "remark": "退役菜单(issue #174,由 FBA 系统管理承载)", + }) + print(f"[ok] 隐藏退役菜单 {legacy}(display=0)") + # ---- 2. 播种角色并分配菜单 ------------------------------------------- menu_ids = flatten_menu_names(cli.get("/sys/menus")) diff --git a/web/auth/users.html b/web/auth/users.html index 2cf5fe2..aea8e0b 100644 --- a/web/auth/users.html +++ b/web/auth/users.html @@ -1,3 +1,4 @@ +