문제

I am developing a feature "X" on OrchardCMS for a multi-tenant environment. I have a set of data which should be seeded into the database against the default tenant and made available for all the tenants with this feature "X" enabled. I do not want to duplicate these default set of data for every tenant on enabling "X" feature.

The users from different tenants should be able to copy this data and make changes to it. These copied data would be restricted to the tenant.

Such a behavior is possible in Orchard?, how do I go about it?

도움이 되었습니까?

해결책

It's relatively easily possible to run code in the context of another tenant through the ShellContext, acquired from IOrchardHost, see: http://orcharddojo.net/blog/advanced-orchard-accessing-other-tenants-services

다른 팁

Not on the server level without significant core changes. Orchard data layer is scoped to a tenant - there is no data sharing. Multi-tenancy feature is designed for achieving better site density by isolating multiple shells within one application. It's not for building any kind of relationship between them.

Your best bet would be to set up some API in the default tenant (eg. using WebAPI) and communicate this way.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top