supabase / realtime

Broadcast, Presence, and Postgres Changes via WebSockets
https://supabase.com/realtime
Apache License 2.0
6.82k stars 315 forks source link

fix: Use INSERT instead of UPDATE #863

Closed filipecabaco closed 4 months ago

filipecabaco commented 6 months ago

What kind of change does this PR introduce?

Uses an INSERT RLS policy instead of a UPDATE to check if user can connect.

This is done by checking if the user was able to insert and it failed due to unique violation so they had permissions to try and insert.

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Updated (UTC) | | :--- | :----- | :------ | :------ | | **realtime-demo** | ⬜️ Ignored ([Inspect](https://vercel.com/supabase/realtime-demo/FF9RrzUDQGpu7EfMhCht7s8EkDHZ)) | | May 2, 2024 4:33pm |
filipecabaco commented 4 months ago

we move out this system for authz