Luc1
02/02/2022, 3:36 PMScott P
02/02/2022, 4:20 PMdelete_files
set to true
for their row.
You would then setup some RLS policies which check the row of the user (using the built-in auth.uid()
function to get their user ID, and then retrieve their row based on this - and then checking if delete_files
is true or not).
Login is handled via a REST endpoint. The email and password of the user is sent to Supabase, and assuming their details are correct, Supabase will respond with a JWT. If you were to decode this, you would see values such as access_token
and id
.
In terms of actually setting up users, you can invite users manually, but I believe that they still need to confirm their email address. It should be possible to manually add a user via SQL if necessary, though I've not looked into this so I'm not sure of what the script would look like.Luc1
02/02/2022, 4:28 PMcreateuser
command but it failed , maybe it's not allowed or I used wrong syntax.
In the end seems that I must cope with the existing structure of roles and user and edit the user table.
I've added RLS to my test table for the file metadata and wrote a template for a policy to let it be read only for authenticated
roles.
I guess is something to start with.... still better option than dealing MongoDB gridFS I guess
Thanks for the answer