From 63239a819dc10c8a6dc60d951f5f2c1cd61fc07c Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Fri, 2 Dec 2022 09:24:20 +0000 Subject: [PATCH] Public App Missing Nav Menu (#8870) * Public App Missing Nav Menu * PR Feedback --- packages/client/src/stores/derived/currentRole.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/client/src/stores/derived/currentRole.js b/packages/client/src/stores/derived/currentRole.js index 28287e1ea4..a56b26050c 100644 --- a/packages/client/src/stores/derived/currentRole.js +++ b/packages/client/src/stores/derived/currentRole.js @@ -1,4 +1,5 @@ import { derived } from "svelte/store" +import { Constants } from "@budibase/frontend-core" import { devToolsStore } from "../devTools.js" import { authStore } from "../auth.js" @@ -6,6 +7,10 @@ import { authStore } from "../auth.js" export const currentRole = derived( [devToolsStore, authStore], ([$devToolsStore, $authStore]) => { - return ($devToolsStore.enabled && $devToolsStore.role) || $authStore?.roleId + return ( + ($devToolsStore.enabled && $devToolsStore.role) || + $authStore?.roleId || + Constants.Roles.PUBLIC + ) } )