Hi I have this error, any idea how to solve this p...
# help
d
Hi I have this error, any idea how to solve this problem Error Message: message: 'new row violates row-level security policy for table "users"', code: '42501', details: null, hint: null}
n
Hello @donpuerto! 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.
d
User Table
RLS Policies
s
Your
user_status
column is actually just called
status
. You're also wrapping booleans as strings -
"false"
!==
false
n
donpuerto (2022-05-11)
d
@Scott P yes amended it but still have problem
Still have problem
Copy code
js
const { data, error } = await supabase.from("users").upsert(
      {
        id: sessionUser.id,
        first_name: "Don",
        last_name: "Puerto",
        username: "@donpuerto",
        email: "don.puert@hotmail.com",
        // status: "Away",
        // is_active: false,
        // is_deleted: false,
        // deleted_at: now(),
        // created_at: now(),
        // updated_at: now(),
      },
      { returning: "minimal" },
      { onConflict: "id" }
    );
2 Views