feat: Phase 2 Sider 菜单由 FBA 服务端授权驱动 + 菜单/角色播种脚本(Epic #159)
This commit is contained in:
+10
-1
@@ -76,7 +76,16 @@ docker exec -it fba_postgres psql -U postgres -d fba # 进数据库
|
||||
- **Phase 1**:iAOP 前端 `web/shared/session.js` 改为调用
|
||||
`/fba/api/v1/auth/login`(JSON 登录)与 `/fba/api/v1/auth/codes`
|
||||
(授权码)做登录与鉴权,现有 `core/auth` 退役。
|
||||
- **Phase 2**:Sider 菜单由 FBA `sys_menu` 接口驱动,替代前端硬编码菜单。
|
||||
- **Phase 2**:Sider 菜单由 FBA `sys_menu` 接口驱动(`GET /fba/api/v1/sys/menus/sidebar`,
|
||||
服务端按角色授权过滤),替代前端硬编码角色过滤。**需先执行菜单播种**:
|
||||
```bash
|
||||
python3 deploy/fba/seed_iaop_menus.py \
|
||||
--base http://127.0.0.1:8001/api/v1 \
|
||||
--username admin --password '<FBA管理员密码>'
|
||||
```
|
||||
脚本幂等:注册 iAOP 6 模块菜单(含子菜单)、创建 `engineer`/`viewer`
|
||||
角色并按 PRD 8.2 分配菜单。之后在 FBA 后台给用户分配角色即可。
|
||||
未播种时前端自动降级为本地角色过滤,菜单不会空白。
|
||||
- **Phase 3**:FBA UI(Vue3 + AntDV)构建时设置
|
||||
`VITE_GLOB_API_URL=http://<域名>/fba`,产物由 nginx 挂在 `/fba-admin/`,
|
||||
作为用户/角色/菜单管理界面。
|
||||
|
||||
Reference in New Issue
Block a user