Navigate between budibase and account portal

This commit is contained in:
Rory Powell 2021-09-14 15:49:59 +01:00
parent 689065d2b8
commit 011193a3dc
2 changed files with 16 additions and 0 deletions

View File

@ -12,6 +12,7 @@
} from "@budibase/bbui" } from "@budibase/bbui"
import ConfigChecklist from "components/common/ConfigChecklist.svelte" import ConfigChecklist from "components/common/ConfigChecklist.svelte"
import { organisation, auth } from "stores/portal" import { organisation, auth } from "stores/portal"
import { admin as adminStore } from "stores/portal"
import { onMount } from "svelte" import { onMount } from "svelte"
import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte" import UpdateUserInfoModal from "components/settings/UpdateUserInfoModal.svelte"
import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte" import ChangePasswordModal from "components/settings/ChangePasswordModal.svelte"
@ -57,6 +58,16 @@
}, },
]) ])
} }
// add link to account portal if the user has access
if ($auth.user.account) {
menu = menu.concat([
{
title: "Account",
href: $adminStore.accountPortalUrl,
},
])
}
return menu return menu
} }

View File

@ -196,6 +196,11 @@ exports.getSelf = async ctx => {
} }
// this will set the body // this will set the body
await exports.find(ctx) await exports.find(ctx)
// append the account portal session information if present
if (ctx.user.account) {
ctx.body.account = ctx.user.account
}
} }
exports.updateSelf = async ctx => { exports.updateSelf = async ctx => {