Can anyone help me, maybe @Lucas G again... with my RLS new row error? I feel like it's set up correctly. It works if I diasble RLS, but then errors when enabled again, so it's obviously the way I've set up the policy thats the issue.
Alex
1 year ago
Do I need to add the owner_id through the API call in the object in the body? Or does that get added automatcially?
Alex
1 year ago
Okay, added user_id to the body and it worked. I'll keep this here if anyone else comes into this issue.
🔥1
Marko
1 year ago
Awesome, thanks for updating the thread. I'm setting up a similar scenario for my app so this will be handy to know 🙂 Hi from NZ as well, by the way 🙂
❤️1
Alex
1 year ago
Awesome!
Lucas G
1 year ago
@Alex and @Marko yes, you'll need to send the user id along if you set it up like this
Something else you can do is have the owner_id column default to auth.uid()
Then it'll be automatically filled in with the id of the user making the call