Multi-tenant app

I saw a post from May '23 that was close, but not exact. I am building a app where there will be several roles and need to understand how I might best structure it or if I can do it in WeWeb. As the app owner under my Company “Manager Material”, my role (and that of my team) will be “SuperAdmin” or something of that nature - though some in my team will eventually have less than SuperAdmin roles where they are mapped to specific customer Companies.

My app will have multiple “Companies” that sign up to a plan, and within each “Company” there will be a hierarchy such as “Admin”, “HR Lead”, “Team Manager” and “Team Member” - such that a Team Manager has access to the data and is mapped to all “Team Members” that list that manager as their “Manager” in my app, and an HR Lead will have access to all data for all Employees of the Company which they are signed up under (the Company that is the customer of Manager Material). Certain fields inside each company - like their payment wallet and their subscription plan will be accessible by the “Admin” for that company, which may be the same as the HR Manager or it May be the same as a Manager Role. So one person can have these two roles concurrently. My question is… is this possible with WeWeb? Can I build such a hierarchy?

You’re asking the wrong question, not entirely, but you should be asking can I build this with ________ ? (Insert the name of your choosen backend solution - Xano / Supabase / …)

Thanks - good point. I was unclear as to whether the setup was supposed to take place using the roles that I see in WeWeb or in the backend. This is my first authentication like this as I’ve ben using Outseta + Webflow with a Xano backend for a different project. Max responded as well in a message so I will check out Supabase for row level security here.

I’m running a multitenant (multi workspace) app on Supabase and it’s as simple as having a few tables and check with RLS for the workspace_id and role.

1 Like