Repository navigation
feat(ldap): support optional linkexistingaccountsbyemail setting - #39
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What / why
Newer n8n instances expose an optional LDAP setting,
linkExistingAccountsByEmail. When it is false, login and sync skip LDAP users whose email matches an existing n8n account. Older instances don't report it and reject it on PUT. This PR adds support for the field without breaking those older instances.Changes
internal/n8n/ldap.go: addLinkExistingAccountsByEmail *bool(omitempty) toLDAPConfigurationandUpdateLDAPConfigurationRequest. When nil, the field is left out of the request and n8n keeps the stored value.internal/cli/ldap.go:ldap gettext output shows the setting, or "not reported (instance does not support it)" when the instance doesn't return it. Theldap sethelp text and the 400 error now say to omit the field whenldap get --output jsondoesn't return it.docs/n8n_ldap_get.mdanddocs/n8n_ldap_set.mdregenerated withmake docs.Verification
make checkpasses locally (tests, cross-builds,go mod tidy -diff, govulncheck: no vulnerabilities)make docsrun if CLI help changedv*tag or release commit in this PRNotes for reviewer
The 20 core fields are still required on
ldap set. Only the new field is optional. No coverage manifest change, because this is a field on an existing operation and not a new operation.🤖 Generated with Claude Code