Frage

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?

War es hilfreich?

Lösung

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

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top