Skip to content

feat(ldap): support optional linkexistingaccountsbyemail setting - #39

Merged
SomeoneWithOptions merged 1 commit into
mainfrom
feat/ldap-link-existing-accounts
Nov 4, 2026
Merged

SomeoneWithOptions merged 1 commit into
mainfrom
feat/ldap-link-existing-accounts

Conversation

@SomeoneWithOptions

Copy link
Copy Markdown
Owner

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: add LinkExistingAccountsByEmail *bool (omitempty) to LDAPConfiguration and UpdateLDAPConfigurationRequest. When nil, the field is left out of the request and n8n keeps the stored value.
  • internal/cli/ldap.go: ldap get text output shows the setting, or "not reported (instance does not support it)" when the instance doesn't return it. The ldap set help text and the 400 error now say to omit the field when ldap get --output json doesn't return it.
  • docs/n8n_ldap_get.md and docs/n8n_ldap_set.md regenerated with make docs.
  • Client and CLI tests cover the field being present, absent, and false.

Verification

  • make check passes locally (tests, cross-builds, go mod tidy -diff, govulncheck: no vulnerabilities)
  • make docs run if CLI help changed
  • No secrets/keys/tokens in diff or logs
  • No v* tag or release commit in this PR

Notes 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

@SomeoneWithOptions
SomeoneWithOptions merged commit e74b73b into main Nov 4, 2026
5 checks passed
@SomeoneWithOptions
SomeoneWithOptions deleted the feat/ldap-link-existing-accounts branch November 4, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant