Multitenant environment where every tenant shares its users with the other tenants

We need two environments with separate data but which share users. We want the users to be able to access both tenants without having to manage two accounts.

From the docs I wasn’t completely clear on this, but is it possible to create a multitenant Consul environment where users can log in to both tenants using the same account?

Hi, @maxstevens :smile:.

Technically, you can try storing all users in the public database schema using config.excluded_models = %w[Delayed::Job Geozone Tenant User] in the apartment initializer, but there might be side effects.

For instance, since users belong to geozones, that means geozones would need to be shared among all tenants as well. Furthermore, users would have the same permissions on every tenant, meaning that if they’re verified on one tenant, they would be verified on all tenants, and if they’re blocked on one tenant, they would be blocked on all tenants.

There would probably be more side effects; currently I’ve no idea how hard they’d be to overcome.