feat(members): split username/display_name, sync updates to authentik, add password reset API and refresh docs

This commit is contained in:
Chris
2026-03-30 22:15:41 +08:00
parent e1a6bbd844
commit ccb99683b8
22 changed files with 361 additions and 207 deletions

View File

@@ -1,33 +1,17 @@
# Frontend Handoff(交給前端 AI
# Frontend Handoff
## 目
把後台管理改為「群組中心權限模型」,並符合以下固定規則:
- `scope` 只用 `site`
- 顯示為 `公司/站台`
- `action` 只允許 `view/edit`,且可多選
## 目前後端契約重點
- 後台登入:只吃 Bearer + admin 群組檢查
- 會員模型:`authentik_sub`, `username`, `email`, `display_name`, `is_active`
- 會員密碼:支援重設 API回傳臨時密碼
## 交辦項目
1. 群組管理頁
- 群組基本資料 CRUD
- 同頁整合站台、系統、模組、會員、action
- action 使用多選(`view``edit`
## 會員頁必做
1. 新增會員表單欄位:`username``email``display_name`
2. 編輯會員表單欄位:`username``email``display_name``is_active`
3. 表格欄位要顯示:`authentik_sub``username``email``display_name`
4. 操作欄新增「重設密碼」按鈕,串 `POST /admin/members/{authentik_sub}/password/reset`
5. 重設成功後顯示臨時密碼,並提醒管理員安全轉交
2. 系統編輯頁
- 顯示該系統被哪些群組使用
- 顯示該系統涉及哪些會員(由群組關聯推導)
3. 模組編輯頁
- 顯示該模組被哪些群組使用
- 顯示該模組涉及哪些會員(由群組關聯推導)
4. 公司頁
- 顯示公司底下站台列表
5. 會員編輯頁
- 顯示/編輯所屬群組
- 會員直接授權先不做
## 串接約束
- 只串接新版群組中心 API
- 不新增最終規格表頁面
- UI/UX 可另外優化,但資料與流程規則不可改
## 其他頁面
- 仍維持群組中心模型site/system/module/member + action(view/edit)
- 系統/模組/公司/會員關聯頁面沿用目前 API