joas8211/payload-tenancy

Tenant parent / child access control

TatisLois opened this issue · 3 comments

I was wondering if this was supported by default, behind an option or if possible to solve through writing custom hooks for access control.

I have three collections (Users, Media, Businesses)

My admin user is related to main business tenancy (let's call it A)
A user joins under a new business, as a child to my base tenancy (let's call that tenancy B)
User of tenancy B adds a image to the media file
My admin user associated to the base tenancy (A) can't see that image in the media collection

is that suppose to happen? Because when I go into the User and Business collections I can see all the child tenant data

Thank you for any clarification 🙏🏽

It's also using the default strategy if thats helpful

Actually I see from this comment Users above in tenant hierarchy can login to tenants below and access resource collections that way that the best way is to create a temporary user and log into that tenant to see those resources, right?

Okay it does work if I switch to the path strategy and am logged in as the account of the parent tenant, then I can visit the URL of the child tenant and see all the content. Sweet!