Verifying the correctness of your RLS policies set up has always been a gap, as highlighted by a number of GitHub discussions like here and here. As such, we're piloting a dedicated UI for RLS testing (using role impersonation as the base), in which you'll be able to
const { data } = await client.from('colors').select('*')Note: Only SELECT queries are supported for now to simplify things. Testing mutation queries (INSERT, UPDATE, DELETE) could trigger side effects such as triggering a database trigger, especially if it involves an external request such as an edge function or HTTP call - we're keeping them out of this preview while we work out a safe way to support them.
Changes are currently set as a feature preview which you can access by clicking on your Profile picture in the top navigation bar . We'll iterate as we get feedback from everyone so please do let us know what you think! ๐๐
Related PR: https://github.com/supabase/supabase/pull/45121
Joshen Lim introduces a feature preview for an RLS tester, allowing users to verify the correctness of their RLS policies through a dedicated UI. The tool supports role impersonation for SQL queries and partial support for client library code testing. Feedback is requested on bugs, issues, and suggestions for improvement.