supabase / realtime

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

fix: Use INSERT instead of UPDATE #863

Closed filipecabaco closed 3 months ago

filipecabaco commented 5 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 5 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 3 months ago

we move out this system for authz