Simey
04/18/2022, 1:18 PMlists with a user_id column. I keep trying to add a rule for auth.uid() = user_id, it adds successfully. However, it doesn't work. The first thing that looks funny is that on the policies view it shows as "ALL Users can only see their own lists `(uid() = user_id)`" with uid() on its own instead of auth.uid(). Furthermore when I then try to access rows it returns nothing.Needle
04/18/2022, 1:18 PM/title command!
We have solved your problem?
Click the button below to archive it.garyaustin
04/18/2022, 1:31 PMNeedle
04/18/2022, 1:31 PMSimey
04/18/2022, 1:52 PMuser_id is type uuid and has a foreign key relationship to auth.users.idSimey
04/18/2022, 1:53 PMsupabase.auth.user() in my frontend code I get a user. could it still be that I'm anon?Simey
04/18/2022, 1:56 PMauth.role() = 'anon' gets me back to seeing all resultsSimey
04/18/2022, 1:56 PMid = 2 or something similar it also does what I'd expectSimey
04/18/2022, 1:57 PMSimey
04/18/2022, 2:00 PMselect * from lists where user_id = (select id from users offset 1 limit 1)Simey
04/18/2022, 2:02 PMSimey
04/18/2022, 2:17 PMgetServerSideProps, I'm not logged inSimey
04/18/2022, 2:17 PMmagic that the supabase package provides a little confusinggaryaustin
04/18/2022, 2:17 PMgaryaustin
04/18/2022, 2:19 PMSimey
04/18/2022, 2:25 PMSimey
04/18/2022, 2:25 PMSimey
04/18/2022, 2:26 PMSimey
04/18/2022, 2:26 PMSimey
04/18/2022, 2:29 PMSimey
04/18/2022, 2:29 PMSimey
04/18/2022, 2:30 PMgaryaustin
04/18/2022, 2:32 PMSimey
04/18/2022, 2:35 PMSimey
04/18/2022, 8:17 PM