Closed benleishman closed 9 years ago
What's the motivation for this? Can you provide some context.
It's a breaking change, you realize.
Sorry first time using GitHub.
The Configuration.MultiTenant check is backward. It's preventing the default tenant from being applied. So when you try to add a user to an unspecified Tenant it fails because the default tenant is always null.
Fix is easy. Just changed the same line in 13 places:
// Issue: This says don't set default tenant variable if MultiTenant is true if (!Configuration.MultiTenant)
to
// Fix: If MultiTenant mode is true and tenant not specified then set it. if ((Configuration.MultiTenant) && (string.IsNullOrWhiteSpace(tenant)))
Just realized I have it wrong. The "default" tenant isn't meant to be used in Multi-Tenant mode. It's to set the default for single-tenant mode. And in Multi-tenant mode specifying the tenant is required. Sorry I just misunderstood this feature. The code was correct as I understand it now. I'll revert the commits.
No problem.
Fixed Configuration.MultiTenant to properly set the default tenant.