Hello ! I'm trying to enable RLS for some table, a...
# help
l
Hello ! I'm trying to enable RLS for some table, and I got a knowed issue for
INSERT
, I get
message: "new row violates row-level security policy for table \"UserDatas\""
on error and even with
returning: "minimal"
and RLS for enable SELECT for all users, I get this error. Someone has a solution ?
n
Hello @lblangenois! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
You'll need to show at least your policies to start getting help.
l
Actually, I've these three rules : - Update for update only this own profile - Insert allowed by all authenticated user - Select for all (this as been added for making "insert" returning working)
g
@lblangenois Your RLS is fine. I suspect you don't actually have a logged in user when you do the insert request. A quick way to check is to change target role to anon. If that works then you don't have a user.