Browse Source
Merge pull request #2825 from Budibase/fix/tenant-subdomain-parsing
Fix tenant subdomain parsing
gh-pages
Rory Powell
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
2 deletions
-
packages/builder/src/pages/builder/_layout.svelte
-
packages/builder/src/pages/builder/auth/login.svelte
|
|
|
@ -20,7 +20,7 @@ |
|
|
|
|
|
|
|
if (!tenantId.includes("localhost:")) { |
|
|
|
// user doesn't have permission to access this tenant - kick them out |
|
|
|
if (user?.tenantId !== tenantId) { |
|
|
|
if (user && user.tenantId !== tenantId) { |
|
|
|
await auth.logout() |
|
|
|
await auth.setOrganisation(null) |
|
|
|
} else { |
|
|
|
|
|
|
|
@ -22,6 +22,7 @@ |
|
|
|
|
|
|
|
$: company = $organisation.company || "Budibase" |
|
|
|
$: multiTenancyEnabled = $admin.multiTenancy |
|
|
|
$: cloud = $admin.cloud |
|
|
|
|
|
|
|
async function login() { |
|
|
|
try { |
|
|
|
@ -84,7 +85,7 @@ |
|
|
|
<ActionButton quiet on:click={() => $goto("./forgot")}> |
|
|
|
Forgot password? |
|
|
|
</ActionButton> |
|
|
|
{#if multiTenancyEnabled} |
|
|
|
{#if multiTenancyEnabled && !cloud} |
|
|
|
<ActionButton |
|
|
|
quiet |
|
|
|
on:click={() => { |
|
|
|
|