Public App Missing Nav Menu (#8870)

* Public App Missing Nav Menu

* PR Feedback
This commit is contained in:
Gerard Burns 2022-12-02 09:24:20 +00:00 committed by GitHub
parent 66a00a677a
commit 63239a819d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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
)
}
)