mirror of
https://github.com/melgarafael/DeskcommCRM.git
synced 2026-10-02 01:28:34 +08:00
Closes INB-10 (G6-03 precondition): SELECT of crm_lead_activities/crm_lead_links now requires parent-lead visibility via EXISTS + fn_can_view_lead (reused from G4-03, not scalar-subquery). crm_lead_links FOR ALL dropped, re-expressed per-command. Write kept org-scope (polymorphic timeline written by service role/AI/panel must not break — service-role-insert=1, agent-own-insert=1). gov-5e (8 tests): cross-attendant reads = 0, own = 1, manager org-wide. Verified-by: gov-verifier PASS 2026-07-18T19:07:30-0300