{ if (o) { formError = ''; formErrors = {}; formModalTab = 'connection'; focusFirstInput(); } }}> {#if isEditing} Edit LDAP configuration {:else} Add LDAP configuration {/if}
{#if formError} {formError} {/if} Connection Group settings

Basic settings

formErrors.name = undefined} /> {#if formErrors.name}

{formErrors.name}

{/if}
formErrors.serverUrl = undefined} /> {#if formErrors.serverUrl}

{formErrors.serverUrl}

{/if}
formEnabled = checked === true} />

Bind credentials (optional)

Service account used to search for users. Leave empty for anonymous bind.

User search settings

formErrors.baseDn = undefined} /> {#if formErrors.baseDn}

{formErrors.baseDn}

{:else}

The base DN to search for users.

{/if}

LDAP filter to find users. Use {`{{username}}`} as placeholder.
OpenLDAP: (uid={`{{username}}`}) • AD: (sAMAccountName={`{{username}}`})

Attribute mapping

TLS settings

formTlsEnabled = checked === true} />
{#if formTlsEnabled}
{/if}

Group settings

Configure group-based access control. These settings are optional.

The base DN to search for groups.

Members of this group will be admins.

Filter to find groups the user belongs to. Use {'{{user_dn}}'} as placeholder.

{#if isEnterprise}

Group to role mappings

Map LDAP groups to Dockhand roles. Users in these groups will be assigned the corresponding role.

{#if formRoleMappings.length > 0}
{#each formRoleMappings as mapping, index}
updateRoleMappingGroupDn(index, e.currentTarget.value)} /> updateRoleMappingRole(index, parseInt(value))} > {#if mapping.roleId} {@const role = roles.find(r => r.id === mapping.roleId)} {role?.name || 'Select role'} {:else} Select role {/if} {#each roles.filter(r => !r.isSystem || r.name !== 'Admin') as role} {role.name} {/each}
{/each}
{/if}
{/if}