feat: add LDAP authentication settings and toggle
Add an admin-only LDAP configuration UI with an enable toggle and full sign-in integration. Backend: - ldapSettings model + migration (single-row config) - GET/PUT/test routes under /ldap (admin-gated; bind password masked) - shared ldapClient with RFC 4515 filter escaping and empty-password guard - signin tries local auth first, then LDAP when enabled (find-or-create local user) so the bootstrap admin is never locked out Frontend: - LDAP settings page (Switch + form + test connection) under /admin/ldap - AdminNav tabs between user management and LDAP - ldapControl util, types, and Ldap i18n namespace for all 6 locales Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -149,6 +149,7 @@
|
||||
},
|
||||
"Admin": {
|
||||
"user_management": "User Management",
|
||||
"ldap": "LDAP",
|
||||
"avatar": "Avatar",
|
||||
"id": "ID",
|
||||
"email": "Email",
|
||||
@@ -434,5 +435,27 @@
|
||||
"tag_error_create": "Failed to create tag. Please try again.",
|
||||
"tag_error_update": "Failed to update tag. Please try again.",
|
||||
"tag_error_delete": "Failed to delete tag. Please try again."
|
||||
},
|
||||
"Ldap": {
|
||||
"ldap_settings": "LDAP Settings",
|
||||
"ldap_description": "Authenticate users against an LDAP directory.",
|
||||
"enable_ldap": "Enable LDAP",
|
||||
"enable_ldap_desc": "Allow users to sign in with their directory credentials.",
|
||||
"server_url": "Server URL",
|
||||
"bind_dn": "Bind DN",
|
||||
"bind_credentials": "Bind Password",
|
||||
"bind_credentials_placeholder": "Leave blank to keep current password",
|
||||
"search_base": "Search Base",
|
||||
"search_filter": "Search Filter",
|
||||
"email_attribute": "Email Attribute",
|
||||
"username_attribute": "Username Attribute",
|
||||
"save": "Save",
|
||||
"saved": "LDAP settings saved",
|
||||
"save_error": "Failed to save LDAP settings",
|
||||
"test_connection": "Test Connection",
|
||||
"test_username": "Test Username",
|
||||
"test_password": "Test Password",
|
||||
"test_success": "Connection successful",
|
||||
"test_failed": "Connection failed"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user