Merge branch 'master' into feature/js-logging

This commit is contained in:
Michael Drury 2025-01-21 14:05:00 +00:00 committed by GitHub
commit dd5e920e26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "3.2.46",
"version": "3.2.47",
"npmClient": "yarn",
"concurrency": 20,
"command": {

View File

@ -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 @@
</MenuItem>
<MenuItem
icon="LockClosed"
on:click={() => changePasswordModal.show()}
on:click={() => {
if (isOwner) {
window.location.href = `${$admin.accountPortalUrl}/portal/account`
} else {
changePasswordModal.show()
}
}}
>
Update password
</MenuItem>

View File

@ -1,5 +1,5 @@
<script>
import { auth } from "@/stores/portal"
import { admin, auth } from "@/stores/portal"
import { ActionMenu, MenuItem, Icon, Modal } from "@budibase/bbui"
import { goto } from "@roxi/routify"
import ProfileModal from "@/components/settings/ProfileModal.svelte"
@ -13,6 +13,8 @@
let updatePasswordModal
let apiKeyModal
$: isOwner = $auth.accountPortalAccess && $admin.cloud
const logout = async () => {
try {
await auth.logout()
@ -32,7 +34,16 @@
</MenuItem>
<MenuItem icon="Moon" on:click={() => themeModal.show()}>Theme</MenuItem>
{#if !$auth.isSSO}
<MenuItem icon="LockClosed" on:click={() => updatePasswordModal.show()}>
<MenuItem
icon="LockClosed"
on:click={() => {
if (isOwner) {
window.location.href = `${$admin.accountPortalUrl}/portal/account`
} else {
updatePasswordModal.show()
}
}}
>
Update password
</MenuItem>
{/if}