From 0fbcfcd33ccbb537c2630b9447b66ca620d54052 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Tue, 21 Jan 2025 13:32:18 +0000 Subject: [PATCH] Redirect to account page for account password reset (#15404) --- .../builder/src/pages/builder/apps/index.svelte | 10 +++++++++- .../portal/_components/UserDropdown.svelte | 15 +++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/pages/builder/apps/index.svelte b/packages/builder/src/pages/builder/apps/index.svelte index e106d0dd68..eaf0f108d8 100644 --- a/packages/builder/src/pages/builder/apps/index.svelte +++ b/packages/builder/src/pages/builder/apps/index.svelte @@ -15,6 +15,7 @@ import { appsStore, organisation, + admin, auth, groups, licensing, @@ -42,6 +43,7 @@ app => app.status === AppStatus.DEPLOYED ) $: userApps = getUserApps(publishedApps, userGroups, $auth.user) + $: isOwner = $auth.accountPortalAccess && $admin.cloud function getUserApps(publishedApps, userGroups, user) { if (sdk.users.isAdmin(user)) { @@ -111,7 +113,13 @@ changePasswordModal.show()} + on:click={() => { + if (isOwner) { + window.location.href = `${$admin.accountPortalUrl}/portal/account` + } else { + changePasswordModal.show() + } + }} > Update password diff --git a/packages/builder/src/pages/builder/portal/_components/UserDropdown.svelte b/packages/builder/src/pages/builder/portal/_components/UserDropdown.svelte index d2a7be8237..6e4f69688f 100644 --- a/packages/builder/src/pages/builder/portal/_components/UserDropdown.svelte +++ b/packages/builder/src/pages/builder/portal/_components/UserDropdown.svelte @@ -1,5 +1,5 @@