From f1da6d5f875b168001d4b62ffc4eca7c245b2ec7 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 9 Feb 2024 15:26:57 +0000 Subject: [PATCH 01/11] Fix for custom branding not appearing on login --- packages/builder/src/pages/builder/auth/_layout.svelte | 3 ++- packages/worker/src/api/controllers/global/configs.ts | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/auth/_layout.svelte b/packages/builder/src/pages/builder/auth/_layout.svelte index a76ddfc329..d1bf623e1a 100644 --- a/packages/builder/src/pages/builder/auth/_layout.svelte +++ b/packages/builder/src/pages/builder/auth/_layout.svelte @@ -14,7 +14,8 @@ $admin.cloud && !$admin.disableAccountPortal && $admin.accountPortalUrl && - !$admin?.checklist?.sso?.checked + !$admin?.checklist?.sso?.checked && + !$admin.checklist.branding ) { window.location.href = $admin.accountPortalUrl } diff --git a/packages/worker/src/api/controllers/global/configs.ts b/packages/worker/src/api/controllers/global/configs.ts index 462aa3060d..a44b173869 100644 --- a/packages/worker/src/api/controllers/global/configs.ts +++ b/packages/worker/src/api/controllers/global/configs.ts @@ -498,6 +498,12 @@ export async function configChecklist(ctx: Ctx) { // They have set up a global user const userExists = await checkAnyUserExists() + + // They have set up branding + const configDoc = await configs.getSettingsConfigDoc() + const config = configDoc.config + const branding = await pro.branding.getBrandingConfig(config) + return { apps: { checked: apps.length > 0, @@ -519,6 +525,7 @@ export async function configChecklist(ctx: Ctx) { label: "Set up single sign-on", link: "/builder/portal/settings/auth", }, + branding, } } ) From 353ab4b1be97df56449058fdc8417fbc8282fe32 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Fri, 9 Feb 2024 20:27:13 +0000 Subject: [PATCH 02/11] update account-portal --- packages/account-portal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/account-portal b/packages/account-portal index cc12291732..aaf64dd002 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit cc12291732ee902dc832bc7d93cf2086ffdf0cff +Subproject commit aaf64dd002a7d2b9ff37f989e03d444c9b9f2b36 From d508e8f01b3c4f13d6a56c305734aa3c37958a58 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 13 Feb 2024 15:26:22 +0000 Subject: [PATCH 03/11] store tenant in cookie for use in account portal --- packages/account-portal | 2 +- .../builder/src/pages/builder/auth/_layout.svelte | 12 ++++++++++-- packages/frontend-core/src/utils/cookies.js | 8 ++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/account-portal b/packages/account-portal index aaf64dd002..50864c77a7 160000 --- a/packages/account-portal +++ b/packages/account-portal @@ -1 +1 @@ -Subproject commit aaf64dd002a7d2b9ff37f989e03d444c9b9f2b36 +Subproject commit 50864c77a7c82e7b3f0d1dcfe6ac29d4a0173726 diff --git a/packages/builder/src/pages/builder/auth/_layout.svelte b/packages/builder/src/pages/builder/auth/_layout.svelte index d1bf623e1a..d66b1bebbf 100644 --- a/packages/builder/src/pages/builder/auth/_layout.svelte +++ b/packages/builder/src/pages/builder/auth/_layout.svelte @@ -1,6 +1,7 @@