Closed 0xn3bs closed 7 years ago
Can you give an example of where you'd use this?
@HipsterJazzbo sure, this is useful in hierarchical tenancy scenarios. I.e. something like:
Tenant A is parent to Tenant B and Tenant C, therefore a user on Tenant A could see data on Tenant A, B, and C. Whereas a user on Tenant B may see data on Tenant A and Tenant B but not Tenant C.
In a real-world situation Tenant A could be "Corporate" and Tenant B and C could be "Franchisees"
Are all those tenants from the same table?
@HipsterJazzbo yes they are.
Hmm I see what you're doing there. However, this library is specifically targeted at doing everything it can to only have ONE of a given tenant registered at any one time, for purposes of data siloing. I think this is outside the scope of this library.
You should be able to whip up your own global scope to handle that situation quite easily though.
This is useful for tenant hierarchy scenarios as well as administration.