Hide groups page if disabled at tenant level

This commit is contained in:
Andrew Kingston 2023-01-12 15:52:37 +00:00
parent e32dc5237a
commit abd84118d9
1 changed files with 8 additions and 5 deletions

View File

@ -2,6 +2,7 @@
import { Page } from "@budibase/bbui" import { Page } from "@budibase/bbui"
import { SideNav, SideNavItem, Content } from "components/portal/page" import { SideNav, SideNavItem, Content } from "components/portal/page"
import { isActive, url } from "@roxi/routify" import { isActive, url } from "@roxi/routify"
import { isEnabled, TENANT_FEATURE_FLAGS } from "helpers/featureFlags"
$: wide = $isActive("./users/index") || $isActive("./groups/index") $: wide = $isActive("./users/index") || $isActive("./groups/index")
</script> </script>
@ -15,11 +16,13 @@
url={$url("./users")} url={$url("./users")}
active={$isActive("./users")} active={$isActive("./users")}
/> />
<SideNavItem {#if isEnabled(TENANT_FEATURE_FLAGS.USER_GROUPS)}
text="Groups" <SideNavItem
url={$url("./groups")} text="Groups"
active={$isActive("./groups")} url={$url("./groups")}
/> active={$isActive("./groups")}
/>
{/if}
</SideNav> </SideNav>
</div> </div>
<slot /> <slot />