1
SQL Editor - Emulate auth.uid()
Source: supabase/supabase#8556 · opened by @jhegele
Hoping someone can point out that this is already a feature but, if it's not, it would be handy to add. In my app, I'm using RLS to secure underlying tables and using views to expose a subset of data from the tables. As an example, imagine a table of user profiles where the user can choose to make his/her profile public and I want to protect certain private columns like phone number or full name across all users. I build the view such that it never pulls the private columns (phone number and full name) and I restrict the rows to rows that are public or are owned by the currently authenticated user. In general, this approach works well for me but as I continue to build my app, I have some situations where I am building a new view that is dependent upon another view. It's challenging to test in the Supabase UI because I cannot force the UI to emulate a logged in user in the SQL Editor. So, when I run my query to test it always shows no rows returned which, based on the…
No pledges yet. Be the first to back this.
Comments
Similar requests
Retrieve list of users by ID
1 vote · 0 comments
[studio] Support multiple results in SQL Editor
2 votes · 0 comments
Dashboard Enhancement: Add Edit and Delete actions for Database Views
3 votes · 0 comments
IP of the entity that does auth, IP of entity that submits request
1 vote · 0 comments
Supabase Studio (SQL Editor): Run as user
7 votes · 0 comments
No comments yet.