usebasejump / basejump

Teams, personal accounts, permissions and billing for your Supabase app
https://usebasejump.com
MIT License
673 stars 63 forks source link

Any plans to check for billing status in RLS ? #56

Closed jide closed 8 months ago

jide commented 8 months ago

Is there any plan to enable RLS at the billing level ?

E.g. Restrict row creation if billing status is not active ?

More generally, I was wondering how you handle restriction based on billing status ?

tiniscule commented 8 months ago

Right now I'm doing client side checks with the billing endpoints and popping up a modal - but I tend to lean towards softer account blocks than outright disabling them.

Would be an easy thing to add - and easy to do in your own RLS policies by checking the basejump.billing_subscriptions status column using the account ID.

I wonder if I should extend the account lookup function to take an active variable, then would only return active account IDs and skip any delinquent. 🤔

jide commented 8 months ago

Thank you for your answer. In my case I think checks on the server side will be fine.

tiniscule commented 8 months ago

Closing for now, I've made a note for a future version. I'm blocked from updates right now until Supabase launches the new dbdev version 😬