1
0
Fork 0
mirror of synced 2024-08-02 11:51:34 +12:00

Use feature instead of license

This commit is contained in:
adrinr 2023-03-28 11:07:05 +01:00
parent d615e1daed
commit b50e4df28c
2 changed files with 21 additions and 5 deletions

View file

@ -1,12 +1,21 @@
<script>
import { Page } from "@budibase/bbui"
import { Page, notifications } from "@budibase/bbui"
import { onMount } from "svelte"
import { SideNav, SideNavItem, Content } from "components/portal/page"
import { isActive, goto } from "@roxi/routify"
import { menu } from "stores/portal"
import { menu, features } from "stores/portal"
$: wide = $isActive("./users/index") || $isActive("./groups/index")
$: pages = $menu.find(x => x.title === "Users")?.subPages || []
$: !pages.length && $goto("../")
onMount(async () => {
try {
await features.init()
} catch (error) {
notifications.error("Error fetching feature configs")
}
})
</script>
<Page>

View file

@ -13,7 +13,14 @@
Divider,
} from "@budibase/bbui"
import AddUserModal from "./_components/AddUserModal.svelte"
import { users, groups, auth, licensing, organisation } from "stores/portal"
import {
users,
groups,
auth,
licensing,
organisation,
features,
} from "stores/portal"
import { onMount } from "svelte"
import DeleteRowsButton from "components/backend/DataTable/buttons/DeleteRowsButton.svelte"
import GroupsTableRenderer from "./_components/GroupsTableRenderer.svelte"
@ -54,7 +61,7 @@
]
let userData = []
$: readonly = !$auth.isAdmin || $licensing.scimEnabled
$: readonly = !$auth.isAdmin || $features.isScimEnabled
$: debouncedUpdateFetch(searchEmail)
$: schema = {
email: {
@ -231,7 +238,7 @@
</Layout>
<Divider />
<div class="controls">
{#if !$licensing.scimEnabled}
{#if !$features.isScimEnabled}
<ButtonGroup>
<Button disabled={readonly} on:click={createUserModal.show} cta>
Add users