Open PhotoshopLOL opened 1 year ago
For my case, I only needed 1 depth of tenancy. A hack I found was to explicitly filter access to create
documents by doing
if (user?.tenant?.slug === 'rootTenant')
in the Tenant collection.
I'm not quite sure how else to do this for 2 layers of depth though. I will keep searching for it!
I'm pretty sure it can also be done by manipulating tenant collection and it's parent field as a user of the plugin. At least when I get improvements to the field override system properly implemented and released (started from #8).
Adding an option might not hurt either since it requires quite extensive modifications to be made by the user of this plugin if done that way. I'm thinking it might be benefitial for other / future users also.
All things considered, I think the game plan is that I'll add the option to limit tenant hirarchy depth.
Hello! Thank you for making this very useful plugin!
Some use cases such as mine only need 1-2 layers of tenancy. Restricting this to a certain depth also patches up the "infinite subtenants" possibility.
With that, I suggest adding a depth setting for creating tenants.