Files
leocrm/app
Agent Zero 407c373173
Check Cross-Plugin Imports / check (push) Has been cancelled
fix(security): enable RLS automatically for plugin-created tenant tables
Plugin migrations run after core migration 0085 which sets up RLS for
all known core tables. Plugin-created tables were left without RLS,
creating a critical multi-tenant isolation gap (84 tables affected).

The migration runner now automatically enables RLS on all newly created
tenant tables after validation:
- ENABLE + FORCE ROW LEVEL SECURITY
- Idempotent DROP IF EXISTS + CREATE fail-closed tenant isolation policy
- GRANT CRUD to crm_api and crm_worker
- ALTER TABLE OWNER TO crm_migration

Global tables (-- GLOBAL TABLE comment) are skipped.
2026-08-06 00:38:41 +02:00
..
2026-07-23 17:17:32 +02:00