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

Show SCIM banner if SCIM enabled

This commit is contained in:
adrinr 2023-03-21 12:06:16 +00:00
parent 1838f75dbc
commit 0c5d33a642
2 changed files with 24 additions and 8 deletions

View file

@ -11,6 +11,7 @@
notifications,
Pagination,
Divider,
Icon,
} from "@budibase/bbui"
import AddUserModal from "./_components/AddUserModal.svelte"
import { users, groups, auth, licensing, organisation } from "stores/portal"
@ -230,14 +231,21 @@
</Layout>
<Divider />
<div class="controls">
<ButtonGroup>
<Button disabled={readonly} on:click={createUserModal.show} cta>
Add users
</Button>
<Button disabled={readonly} on:click={importUsersModal.show} secondary>
Import
</Button>
</ButtonGroup>
{#if $licensing.scimEnabled}
<ButtonGroup>
<Button disabled={readonly} on:click={createUserModal.show} cta>
Add users
</Button>
<Button disabled={readonly} on:click={importUsersModal.show} secondary>
Import
</Button>
</ButtonGroup>
{:else}
<div class="scim-banner">
<Icon name="Info" size="S" />
Users are synced from your AD
</div>
{/if}
<div class="controls-right">
<Search bind:value={searchEmail} placeholder="Search" />
{#if selectedRows.length > 0}
@ -322,4 +330,9 @@
.controls-right :global(.spectrum-Search) {
width: 200px;
}
.scim-banner {
display: flex;
gap: var(--spacing-s);
}
</style>

View file

@ -18,6 +18,7 @@ export const createLicensingStore = () => {
groupsEnabled: false,
backupsEnabled: false,
brandingEnabled: false,
scimEnabled: false,
// the currently used quotas from the db
quotaUsage: undefined,
// derived quota metrics for percentages used
@ -66,6 +67,7 @@ export const createLicensingStore = () => {
const backupsEnabled = license.features.includes(
Constants.Features.BACKUPS
)
const scimEnabled = license.features.includes(Constants.Features.SCIM)
const environmentVariablesEnabled = license.features.includes(
Constants.Features.ENVIRONMENT_VARIABLES
)
@ -88,6 +90,7 @@ export const createLicensingStore = () => {
groupsEnabled,
backupsEnabled,
brandingEnabled,
scimEnabled,
environmentVariablesEnabled,
auditLogsEnabled,
enforceableSSO,