star-cloud/resources
sky121113 63219a31fb [FIX] 遠端管理歷史紀錄套用機台授權過濾,修復租戶帳號 500
1. RemoteController index() 與 stock() 的歷史查詢加上 whereHas('machine'),透過 Machine 的 machine_access 全域作用域,使租戶僅能看到自己被授權機台的指令/補貨紀錄;系統管理員不受限制仍可看全部,符合 RBAC 機台以帳號授權原則。
2. 修復根因:先前重構將 Blade 改為對 machine 關聯直接呼叫 only(),租戶遇到未授權機台時 machine 為 null 導致整頁 500。
3. tab-history 與 tab-history-index 三處 $item->machine->only() 改為 null-safe(?->...?? null)作為防禦,避免未來其他查詢路徑漏過濾再次崩潰。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:15:05 +08:00
..
css style: expand flatpickr calendar width to accommodate padding and prevent right column clipping 2026-05-18 15:05:54 +08:00
js [FEAT] 優化機台硬體通訊協議與管理介面互動性 2026-04-08 14:52:00 +08:00
views [FIX] 遠端管理歷史紀錄套用機台授權過濾,修復租戶帳號 500 2026-06-17 11:15:05 +08:00