Fix tenant subdomain parsing
This commit is contained in:
parent
0f4cb52618
commit
89c9118337
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
if (!tenantId.includes("localhost:")) {
|
if (!tenantId.includes("localhost:")) {
|
||||||
// user doesn't have permission to access this tenant - kick them out
|
// 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.logout()
|
||||||
await auth.setOrganisation(null)
|
await auth.setOrganisation(null)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
$: company = $organisation.company || "Budibase"
|
$: company = $organisation.company || "Budibase"
|
||||||
$: multiTenancyEnabled = $admin.multiTenancy
|
$: multiTenancyEnabled = $admin.multiTenancy
|
||||||
|
$: cloud = $admin.cloud
|
||||||
|
|
||||||
async function login() {
|
async function login() {
|
||||||
try {
|
try {
|
||||||
|
@ -84,7 +85,7 @@
|
||||||
<ActionButton quiet on:click={() => $goto("./forgot")}>
|
<ActionButton quiet on:click={() => $goto("./forgot")}>
|
||||||
Forgot password?
|
Forgot password?
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
{#if multiTenancyEnabled}
|
{#if multiTenancyEnabled && !cloud}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
quiet
|
quiet
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
|
Loading…
Reference in New Issue