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