Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’4y agoβ€’
3 replies
Alex Raduca

'User can select their own records' policy not working

Hi everyone!

I am following up this guide on NextJS & Supabase: https://egghead.io/courses/build-a-saas-product-with-next-js-supabase-and-stripe-61f2bc20

I have two tables: Profile(id=uuid) & Document(owner_id = link to Profile (uuid))
I am setting up table access policies as follows:
Profile: User can select their own profile: (uid() = id)
Document: User can select their own documents: (uid() = owner_id)

The Profile table policy works and I can access the data
The Document table policy however returns 0 documents when is enabled

I can't figure out what I am doing wrong, can I get some help please?

Thank you
image.png
image.png
image.png
image.png
image.png
image.png
egghead
Build a SaaS product with Next.js, Supabase and Stripe
Throughout this course, you will learn how to build a static app with authentication that is backed by a database, change the structure of that database without compromising existing data, and take payments for individual products to manage subscriptions.

For your frontend, this application will be using Next.js and Tailwind CSS. You will learn...
Build a SaaS product with Next.js, Supabase and Stripe
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

policy not working
SupabaseSSupabase / help-and-questions
4y ago
Supabase Admin policy not working
SupabaseSSupabase / help-and-questions
6mo ago
RLS policy 'in' not working
SupabaseSSupabase / help-and-questions
4y ago
Issue with SELECT Policy
SupabaseSSupabase / help-and-questions
3mo ago