perf: disable read-time sync and keep provider sync manual

This commit is contained in:
Chris
2026-04-03 01:23:42 +08:00
parent f351fe6454
commit 21167659f8
5 changed files with 104 additions and 6 deletions

View File

@@ -26,7 +26,8 @@
- 群組階層:`Company Group -> Site SubGroup`
- 系統角色:以 Keycloak client role 表示,對應 DB `roles`
- `site_roles` 代表某 Site 擁有的 Keycloak role 集合。
- 補齊策略:若 Keycloak 有、DB 沒有,後台同步流程會自動 upsert 到 DB
- 同步策略改為手動觸發:不在列表讀取 (`R`) 時自動同步
- 補齊策略:僅在手動同步按鈕(`POST /admin/sync/from-provider`)或 CUD 流程時同步。
- 使用者加入 Site 時,透過同步邏輯使其在 IdP 端取得對應角色能力。
## 後台安全線