wacrm/src
Arnas Donauskas 3110932d78
fix(templates): scope template picker to account, not user
The inbox/contact TemplatePicker fetched approved templates filtered by
`user_id = current user`, so in a shared account a teammate only saw
templates they personally created — others' approved templates were
hidden, leaving them unable to send those templates.

message_templates is account-owned and its RLS SELECT policy already
scopes rows to account members (is_account_member, migration 017), so
the user_id filter was both redundant and over-restrictive. Drop it and
rely on RLS, matching the broadcast template picker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 17:33:41 +03:00
..
app fix(webhook): run inbound processing in after() so it survives serverless freeze 2026-06-26 17:34:44 +03:00
components fix(templates): scope template picker to account, not user 2026-06-29 17:33:41 +03:00
hooks fix(broadcasts): collect header media URL for image/video templates (#298) 2026-06-25 17:17:18 +03:00
lib fix(auth): load account context without an embedded FK join 2026-06-25 13:34:26 +03:00
types refactor(inbox): record voice notes client-side, drop server ffmpeg 2026-06-18 11:27:12 +03:00
middleware.test.ts fix(auth): preserve refreshed Supabase cookies across middleware redirects 2026-06-23 10:08:05 +03:00
middleware.ts fix(auth): preserve refreshed Supabase cookies across middleware redirects 2026-06-23 10:08:05 +03:00