{{ _("LDAP Settings") }} {{ _("Experimental") }}

{{ _("Configure LDAP for user authentication and management") }}

{{ form.hidden_tag() }} {# ───── Enable LDAP ──────────────────────────────────── #}

{{ _("Turn on LDAP integration") }}

{# ───── Connection Settings ──────────────────────────── #}

{{ _("Connection") }}

{{ _("LDAP server connection") }}

{{ form.server_url.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.server_url(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white", placeholder="ldap://ldap.example.com:389") }}

{{ _("e.g., ldap://server:3890 or ldaps://server:6360") }}

{% for err in form.server_url.errors %}

{{ err }}

{% endfor %}
{{ form.service_account_dn.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.service_account_dn(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white", placeholder="cn=wizarr,ou=people,dc=example,dc=com") }} {% for err in form.service_account_dn.errors %}

{{ err }}

{% endfor %}
{{ form.service_account_password.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.service_account_password(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white", type="password") }}

{{ _("Encrypted before storage") }}

{% for err in form.service_account_password.errors %}

{{ err }}

{% endfor %}
{# ───── User & Group Base DNs ─────────────────────────── #}

{{ _("User & Group Settings") }}

{{ _("Where to find users and groups") }}

{{ form.user_base_dn.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.user_base_dn(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white", placeholder="ou=people,dc=example,dc=com") }} {% for err in form.user_base_dn.errors %}

{{ err }}

{% endfor %}
{{ form.group_base_dn.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.group_base_dn(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white", placeholder="ou=groups,dc=example,dc=com") }}

{{ _("Optional - only needed for admin group restriction") }}

{% for err in form.group_base_dn.errors %}

{{ err }}

{% endfor %}

{{ _("Sync LDAP groups to populate admin group selection") }}

{{ _("Defaults are optimized for LLDAP. Only change if using a different LDAP server.") }}

{{ form.user_search_filter.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.user_search_filter(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white") }}
{{ form.username_attribute.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.username_attribute(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white") }}
{{ form.email_attribute.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.email_attribute(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white") }}
{{ form.user_object_class.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.user_object_class(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white") }}
{{ form.group_object_class.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.group_object_class(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white") }}
{{ form.group_member_attribute.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.group_member_attribute(class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white") }}
{# ───── Users ─────────────────────────────────────────── #}

{{ _("Users") }}

{{ _("Manage all users - both LDAP and local authentication") }}

{{ _("Users can authenticate via LDAP or locally. Sync automatically imports new users from LDAP.") }}

{# ───── Admin Authentication ──────────────────────────── #}

{{ _("Admin Authentication") }}

{{ _("Allow administrators to log in using LDAP") }}

{{ _("Enable admin login using LDAP credentials") }}

{{ form.admin_group_dn.label(class="block mb-2 text-sm font-medium text-gray-900 dark:text-white") }} {{ form.admin_group_dn(id="admin_group_dn_select", class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary focus:border-primary block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white") }}

{{ _("Optional: Restrict admin access to members of this LDAP group") }}

{# ───── Submit ───────────────────────────────────────── #}