iachat/spec/enterprise/services
Rodribm10 4e798944cf fix(captain): provision unit via RPC SECURITY DEFINER (RLS bypass)
Anon key não tinha permissão de INSERT em reserva_hotel.unidades — RLS
exige authenticated + tenant_member, não atendido. POST direto falhava
sem feedback útil.

Solução: RPC reserva_hotel.provision_unidade(...) com SECURITY DEFINER
que faz upsert idempotente bypassando RLS, com validações de tenant +
marca dentro da função. EXECUTE granted to anon.

Service agora chama /rpc/provision_unidade em vez de POST /unidades.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 09:11:57 -03:00
..
captain fix(captain): provision unit via RPC SECURITY DEFINER (RLS bypass) 2026-05-01 09:11:57 -03:00
cloudflare Merge branch 'main' into chore/merge-upstream-4.5.0 2025-08-20 11:20:31 -03:00
companies Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
contacts Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
enterprise Merge branch 'main' into chore/merge-upstream-4.11.0 2026-02-17 23:05:26 -03:00
internal Merge branch main into chore/merge-upstream 2025-12-20 12:44:31 -03:00
messages fix(messages): reduce audio transcription 400 retry noise (#13487) 2026-02-17 13:25:13 +05:30
sla chore: apply Rails/SaveBang cop (#15) 2025-04-03 23:29:24 -03:00
twilio feat(voice): Improved voice call creation flow [EE] (#12268) 2025-08-22 13:38:23 +02:00
voice feat(enterprise): add voice conference API (#13064) 2025-12-15 15:11:59 -08:00