mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 11:16:46 +00:00
Changes
Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
parent
5bbc5d2574
commit
6048ddcfba
1 changed files with 15 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
DROP POLICY IF EXISTS "Qualquer pessoa pode enviar lead" ON public.enterprise_leads;
|
||||||
|
|
||||||
|
CREATE POLICY "Visitantes podem enviar lead"
|
||||||
|
ON public.enterprise_leads FOR INSERT
|
||||||
|
TO anon, authenticated
|
||||||
|
WITH CHECK (
|
||||||
|
char_length(company_name) BETWEEN 1 AND 200
|
||||||
|
AND char_length(contact_name) BETWEEN 1 AND 200
|
||||||
|
AND char_length(email) BETWEEN 3 AND 320
|
||||||
|
AND email ~* '^[^@\s]+@[^@\s]+\.[^@\s]+$'
|
||||||
|
AND team_size IN ('1-10','11-50','51-200','200+')
|
||||||
|
AND (message IS NULL OR char_length(message) <= 2000)
|
||||||
|
AND status = 'new'
|
||||||
|
);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue