From dfee7ebc7a75764e0a3a237652a28d798ceecbac Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 7 Oct 2021 15:41:53 +0100 Subject: [PATCH] Remove update screen in the cloud --- .../builder/src/pages/builder/portal/_layout.svelte | 13 +++++++++---- .../src/pages/builder/portal/settings/update.svelte | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/_layout.svelte b/packages/builder/src/pages/builder/portal/_layout.svelte index 02f49bec5a..8fca18d29d 100644 --- a/packages/builder/src/pages/builder/portal/_layout.svelte +++ b/packages/builder/src/pages/builder/portal/_layout.svelte @@ -46,11 +46,16 @@ title: "Theming", href: "/builder/portal/settings/theming", }, - { - title: "Updates", - href: "/builder/portal/settings/update", - }, ]) + + if (!$adminStore.cloud) { + menu = menu.concat([ + { + title: "Updates", + href: "/builder/portal/settings/update", + }, + ]) + } } else { menu = menu.concat([ { diff --git a/packages/builder/src/pages/builder/portal/settings/update.svelte b/packages/builder/src/pages/builder/portal/settings/update.svelte index 3931203f44..5deb724a7c 100644 --- a/packages/builder/src/pages/builder/portal/settings/update.svelte +++ b/packages/builder/src/pages/builder/portal/settings/update.svelte @@ -10,14 +10,14 @@ Label, } from "@budibase/bbui" import api from "builderStore/api" - import { auth } from "stores/portal" + import { auth, admin } from "stores/portal" import { redirect } from "@roxi/routify" let version // Only admins allowed here $: { - if (!$auth.isAdmin) { + if (!$auth.isAdmin || $admin.cloud) { $redirect("../../portal") } }