Use feature instead of license
This commit is contained in:
parent
d615e1daed
commit
b50e4df28c
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue