mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 09:19:51 +00:00
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> |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| hooks | ||
| lib | ||
| types | ||
| middleware.test.ts | ||
| middleware.ts | ||