iachat/enterprise
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
..
app fix(captain): provision unit via RPC SECURITY DEFINER (RLS bypass) 2026-05-01 09:11:57 -03:00
config feat: Conversation workflows(EE) (#13040) 2026-01-27 11:36:20 +04:00
lib feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
LICENSE chore: update EE LICENCE year (#11344) 2025-04-21 15:29:55 +05:30
tasks_railtie.rb fix: Search rake task causing Rails boot error (#12416) 2025-09-15 22:21:59 +05:30