Multi-tenant using external user list

Here is what I’m trying to achieve:

  1. User database in Xano exists (true today) called provider_users (this is for users belonging to a company, a relational table)

  2. When a user from that table logs in, they would only see records linked to the Company in which they are related

  3. The control is dynamic so that we do not need to manage the access in two places

  • These company users should only see records that are linked to the same company record

Example:

  1. John Doe is a “Company User”
  2. John Doe is linked to “Pro Roofing Inc.”
  3. 10 Job records are linked to “Pro Roofing Inc”
  4. When John Doe logs in, John can see details of “Pro Roofing Inc” (whatever fields we enable) and the 10 Job records

I’m struggling to understand how to manage this type of access via multi-tenant permissions.

1 Like

Hi @matt were you able to solve this in Jetadmin? I have a very similar use case.

1 Like

It is hardly possible without impersonation that should be coded manually. or you may use supabase that gives you authentication + Row Level security. As I know jetAdmin allows to use PostgreSQL as an identity provider.

1 Like