Skip to content

[OCISDEV-704] Dont write ExternalID when empty - #12085

Merged
kobergj merged 1 commit into
stable-8.0from
OmitExternalIDWhenEmpty
Mar 9, 2026
Merged

kobergj merged 1 commit into
stable-8.0from
OmitExternalIDWhenEmpty

Conversation

@kobergj

@kobergj kobergj commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Fixes issue with ocis not being able to create new users in 8.0.0

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes LDAP user creation in the graph service by avoiding writing an empty externalID attribute to LDAP entries (a behavior that can break user creation on some LDAP servers, impacting ocis 8.0.0).

Changes:

  • Stop including the externalID LDAP attribute when user.GetExternalID() is empty.
  • Extend TestCreateUser to cover both “with externalID” and “without externalID” scenarios.
  • Add an unreleased changelog entry documenting the bugfix.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
services/graph/pkg/identity/ldap.go Only adds externalID to LDAP attributes map when non-empty.
services/graph/pkg/identity/ldap_test.go Updates create-user test to validate behavior with/without externalID.
changelog/unreleased/fix-dont-write-empty-externalid-to-ldap.md Documents the bugfix for release notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@kobergj
kobergj force-pushed the OmitExternalIDWhenEmpty branch from d8cb80e to fdc67b0 Compare March 4, 2026 11:18
@mzner
mzner self-requested a review March 4, 2026 11:31
@mmattel
mmattel force-pushed the OmitExternalIDWhenEmpty branch from fdc67b0 to dc754e6 Compare March 6, 2026 17:02
@sonarqubecloud

sonarqubecloud Bot commented Mar 6, 2026

Copy link
Copy Markdown

@kobergj
kobergj merged commit 01bb23f into stable-8.0 Mar 9, 2026
3 of 4 checks passed
@kobergj
kobergj deleted the OmitExternalIDWhenEmpty branch March 9, 2026 09:55
ownclouders pushed a commit that referenced this pull request Mar 9, 2026
[OCISDEV-704] Dont write ExternalID when empty
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.

4 participants