feat(members): split username/display_name, sync updates to authentik, add password reset API and refresh docs
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
## 1) 啟動後端
|
||||
```bash
|
||||
cd backend
|
||||
.venv/bin/uvicorn app.main:app --env-file .env.development --host 127.0.0.1 --port 8000
|
||||
./scripts/start_dev.sh
|
||||
```
|
||||
|
||||
## 2) 啟動前端
|
||||
@@ -13,19 +13,18 @@ npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 3) 基本檢查
|
||||
- Backend health: `GET http://127.0.0.1:8000/healthz`
|
||||
- Frontend: `http://localhost:5173` 或 `http://127.0.0.1:5173`
|
||||
- 檢查 admin API 是否有自動帶 `X-Client-Key`、`X-API-Key`
|
||||
## 3) 重要環境變數
|
||||
- `backend/.env.development`
|
||||
- `ADMIN_REQUIRED_GROUPS=member-admin`
|
||||
- `AUTHENTIK_*` 需可連到 Authentik
|
||||
|
||||
## 4) 驗收順序(本地)
|
||||
1. 建立公司、站台
|
||||
2. 建立系統、模組
|
||||
3. 建立會員
|
||||
4. 建立群組
|
||||
5. 在群組配置:站台/系統/模組/action(view/edit)/會員
|
||||
6. 到系統/模組/公司/會員頁確認關聯列表是否正確
|
||||
## 4) 基本檢查
|
||||
- `GET http://127.0.0.1:8000/healthz`
|
||||
- 登入後打 `GET /admin/members` 應可回資料
|
||||
- 非 admin 群組帳號打 `/admin/*` 應回 `403`
|
||||
|
||||
## 5) 注意事項
|
||||
- 本輪不產最終規格表
|
||||
- DB 真實來源僅 `backend/scripts/init_schema.sql`
|
||||
## 5) 會員流程驗收
|
||||
1. 新增會員(username/email/display_name,開啟 sync_to_authentik)
|
||||
2. 確認列表可看到新會員與 `authentik_sub`
|
||||
3. 點「重設密碼」,取得臨時密碼
|
||||
4. 到 Authentik 驗證該會員可用新密碼登入
|
||||
|
||||
Reference in New Issue
Block a user