{#if $licenseStore.loading}
{:else if !$licenseStore.isEnterprise}

Enterprise feature

LDAP / Active Directory integration is available with an enterprise license. Connect to your organization's directory services for centralized authentication.

{:else}
LDAP configurations

Connect to LDAP or Active Directory servers for centralized user authentication.

{#if $canAccess('settings', 'edit')} {/if}
{#if ldapLoading}
{:else if ldapConfigs.length === 0} {:else}
{#each ldapConfigs as config}
{config.name} {#if config.enabled} Enabled {:else} Disabled {/if}

{config.serverUrl}

{#if $canAccess('settings', 'edit')} deleteLdapConfig(config.id)} onOpenChange={(open) => confirmDeleteLdapId = open ? config.id : null} > {#snippet children({ open })} {/snippet} {/if}
{/each}
{#if ldapTestResult}
{#if ldapTestResult.success}

Connection successful! Found {ldapTestResult.userCount} users.

{:else}

Connection failed: {ldapTestResult.error}

{/if}
{/if} {/if}
{/if}