Two layer Multi Tenancy

Hi, I wanted to ask if there is a way to do a Two Layers Tenancy? (A Tenancy inside another) If so where I can find documentation on how to implement it?

Thanks in advance

Hi,

It depends a little bit on what features you want to use.

First of all: do you use the multi tenancy addon or do you just want to build it with the security Subsystem? Generally speaking the security system is flexible enough to support that use-case.

If we are talking about the multitenancy addon: do you need to have any shared data between the sub tenants or do you want to have complete isolation? If you need that it is possible to use the multitenancy addon for the outer tenant and the security Subsystem for the inner tenants. If not you can probably also simply use the multitenancy addon as is and simply create two tenants side by side.

Cheers
Mario

Thanks for all your help mario!

This is my case: I work for two Foundations and each foundation runs and manages two separate schools. So it would be 4 schools, 2 of them associated to one of the two foundations. The foundations are separate from the other foundations and each of the foundations schools are separate from the other school the foundation has and other foundations school.

I need the following

So it would be

  • Foundation 1 (Main Tenant) has 2 schools (2 tenants)
  • Foundation 2 (Main Tenant) has 2 schools (2 tenants)

3 data stores isolated from the rest

  • 1 for each foundations data
  • 2 for each schools data

User permissions

  • Group of admins to manage all of the tenants functionalities and data
  • Group of users to access the foundations and its associated 2 schools data
    1 Group of users to access only dats from 1 of the schools they are associated with

Rgds

Hi,

So if you have an admin for one foundation and have shared data within the foundation, I would suggest to use the multitenancy addon for the foundation separation.

For showing only school 1 for user group 1, you can scope it by row-level roles. You can either link the user via a dedicated attribute to a school, or create a mapping entity for the lookup. Alternatively you can also define a session attribute at login to reference the school and then use this attribute in the row-level role to filter accordingly.

Cheers
Mario

1 Like