related Json api to load a resource which is not global multi-tendency when we have master user
Hi Sorry, i think it can not be supported and i should create custom action and call it in api json. but i just want to be sure about it
The scenario is as follows:
- We have a master account for which we set
multi-tenancy
to nil at login.
- Now, each error page
is related to a specific tenancy.
- So, the related
router cannot automatically show error pages to the master user.
- However, it can display them to non-master users because tenancy is not nil
I think I cannot use related for this use case and instead need to call a custom action.
Am I correct?
Thanks in advance.Solution:Jump to solution
You can add a special action for the read action that allows bypassing multitenancy and then only allow an admin user to do that.
3 Replies
Hm...so you're using attribute multitenancy?
Solution
You can add a special action for the read action that allows bypassing multitenancy and then only allow an admin user to do that.
Yes i did like this, create another action to do this.
When a project has multitenancy some place global some place not, it makes huge complexity for managing data (in my opinion), it forces me to create extra action for api!
for example some place read action has default behaviour when tenancy is set from plug
Thank you