portal-auth P3 前置:graph 粗閘 helpers(D-4)+session 能力欄位+kbdb-proxy 透傳 library(P1 順延)

- portal.ts:export 共用 helpers(requirePortalUser/parseLibraries/kbdbFetch/run…)
  +graphSourceLibraries/hasGraphAccess/workflowsVisible;/portal/session 補
  graph_allowed、workflows_visible(顯示提示,真閘在 /portal/data/* 路由層)
- portal_library seed 加 graph_source slot;ensurePortalTemplates 冪等補舊 template
  缺的 slots(updateRecord 對 template 外 slot 會 reject,不補就寫不進標記)
- admin libraries PATCH 收 graph_source(boolean);toPublicLibrary 回 graph_source
- kbdb-proxy /kbdb/search 與 /kbdb/entries 白名單加 library(tasks.md P1 順延一行)
- PORTAL_SHOW_WORKFLOWS var(D-8,預設 admin)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-07-14 12:59:41 +08:00
parent d4611950c0
commit 5668d48d37
6 changed files with 117 additions and 26 deletions
+4
View File
@@ -142,6 +142,10 @@ CONSOLE_TENANT = "leo"
# issue 要求比 console 30 天短效。停用帳號的即時性不靠這個 TTL(每請求回讀 user record)。
PORTAL_SESSION_TTL = "604800"
# Portal 工作流頁可見性(portal-auth P3design D-8 定案):admin(預設)/ all / off。
# 唯讀 list+最近執行、不開 triggerenforce 在 /portal/data/workflows 路由層。
PORTAL_SHOW_WORKFLOWS = "admin"
# 駕駛艙「等你的事」活資料源(fix/console-dashboard-live-data2026-07-07):
# InkStoneCo sprint 檔「## 等 leo 清單」(progress-guard 每日維護)——KBDB dash_wait 沒有
# 活的維護管線(07-04 之後沒人寫、銷案不同步),不再當首選資料源。