Use feature instead of license
This commit is contained in:
parent
d615e1daed
commit
b50e4df28c
|
@ -1,12 +1,21 @@
|
||||||
<script>
|
<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 { SideNav, SideNavItem, Content } from "components/portal/page"
|
||||||
import { isActive, goto } from "@roxi/routify"
|
import { isActive, goto } from "@roxi/routify"
|
||||||
import { menu } from "stores/portal"
|
import { menu, features } from "stores/portal"
|
||||||
|
|
||||||
$: wide = $isActive("./users/index") || $isActive("./groups/index")
|
$: wide = $isActive("./users/index") || $isActive("./groups/index")
|
||||||
$: pages = $menu.find(x => x.title === "Users")?.subPages || []
|
$: pages = $menu.find(x => x.title === "Users")?.subPages || []
|
||||||
$: !pages.length && $goto("../")
|
$: !pages.length && $goto("../")
|
||||||
|
|
||||||
|
onMount(async () => {
|
||||||
|
try {
|
||||||
|
await features.init()
|
||||||
|
} catch (error) {
|
||||||
|
notifications.error("Error fetching feature configs")
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Page>
|
<Page>
|
||||||
|
|
|
@ -13,7 +13,14 @@
|
||||||
Divider,
|
Divider,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import AddUserModal from "./_components/AddUserModal.svelte"
|
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 { onMount } from "svelte"
|
||||||
import DeleteRowsButton from "components/backend/DataTable/buttons/DeleteRowsButton.svelte"
|
import DeleteRowsButton from "components/backend/DataTable/buttons/DeleteRowsButton.svelte"
|
||||||
import GroupsTableRenderer from "./_components/GroupsTableRenderer.svelte"
|
import GroupsTableRenderer from "./_components/GroupsTableRenderer.svelte"
|
||||||
|
@ -54,7 +61,7 @@
|
||||||
]
|
]
|
||||||
let userData = []
|
let userData = []
|
||||||
|
|
||||||
$: readonly = !$auth.isAdmin || $licensing.scimEnabled
|
$: readonly = !$auth.isAdmin || $features.isScimEnabled
|
||||||
$: debouncedUpdateFetch(searchEmail)
|
$: debouncedUpdateFetch(searchEmail)
|
||||||
$: schema = {
|
$: schema = {
|
||||||
email: {
|
email: {
|
||||||
|
@ -231,7 +238,7 @@
|
||||||
</Layout>
|
</Layout>
|
||||||
<Divider />
|
<Divider />
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{#if !$licensing.scimEnabled}
|
{#if !$features.isScimEnabled}
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<Button disabled={readonly} on:click={createUserModal.show} cta>
|
<Button disabled={readonly} on:click={createUserModal.show} cta>
|
||||||
Add users
|
Add users
|
||||||
|
|
Loading…
Reference in New Issue