FeatureFuel
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.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests