Would someone have an idea how I could leverage th...
# help
l
Would someone have an idea how I could leverage the Row-Level Security features when using a direct DB connection with an ORM (Knex.js/Objection.js)?
I'm using a Hapi.js stack with Hapipal (https://hapipal.com) and the one thing I really love in it is the Objection.js ORM integration. It just makes DB queries so much nicer to write and all. And I'd love to use this with Supabase, too. I've already migrated some of my data from one of my project to Supabase and it's working just fine without RLS on.
s
You don't get access to RLS when connecting to the DB directly
l
Oh dang
That's good to know, thank you! I'll see if there could be some other solution in my code to restrict the inserts and updates then 👍
Maybe I'll have to route all the requests through my API and never expose the Supabase URI in the frontend
s
If you are working with a server side framework then that can be handled in the server code
l
Yeah, gonna do that with Hapi 👍 Currently just thinking the scenario where I'd fetch private profile data for authenticated users. Probably have to make an authentication check where I check if the user is found in Supabase via the JWT whenever I receive a request in my Hapi server.