Skip to content

fix(graph): [OCISDEV-964] education user delete uses wrong id - #12395

Merged
kobergj merged 3 commits into
owncloud:stable-8.0from
kobergj:fix/OCISDEV-964-education-user-delete-uses-wrong-id
Jun 11, 2026
Merged

kobergj merged 3 commits into
owncloud:stable-8.0from
kobergj:fix/OCISDEV-964-education-user-delete-uses-wrong-id

Conversation

@kobergj

@kobergj kobergj commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a v8.0 regression where DELETE /graph/v1.0/education/users/{id} returns 404 itemNotFound while leaving the LDAP entry in place.

The education user delete handler passed user.GetExternalID() to the backend, but with the default RequireExternalID=false the LDAP backend looks the user up by name-or-UUID — so the lookup never matched, the DelRequest was never issued, and the response was a 404. Switching to user.GetId() aligns with the regular /users handler and the pre-v8.0 behavior; the externalID-vs-UUID branching is already centralized inside the LDAP backend's getEducationUser helper.

While at it, the personal space purge is now performed after the LDAP delete in both DeleteUser and DeleteEducationUser. Previously, a failure of the LDAP delete left the user without a personal space — the space had already been purged before the LDAP delete was even attempted.

Regression introduced in v8.0 by 2fcfa32 (feat: use externalID for provisioning api).

Related Issue

Motivation and Context

Breaks the BYCS Provisioning API (and any client that does not provide a top-level externalID in the create payload). Confirmed on BYCS production (request-id a562829ffb89320037da8a30fd3c47f4, 2026-06-01).

How Has This Been Tested?

  • make -C services/graph test — 425/425 ginkgo specs pass, including two new specs that assert:
    • identityEducationBackend.DeleteEducationUser is called with user.GetId() (not GetExternalID())
    • on LDAP delete failure, ListStorageSpaces / DeleteStorageSpace are not called (ordering invariant)
  • make -C services/graph build — clean
  • make -C ocis build — clean
  • make -C services/graph golangci-lint — no new warnings (verified by stashing the change)

Forward-port plan

Cherry-pick to stable-8.1 and master after merge.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt (refactoring, increase in test coverage, etc.)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation / Changelog (changelog/unreleased/fix-education-user-delete.md)

@kw-security

kw-security commented Jun 9, 2026 •

Copy link
Copy Markdown

⚠️ Snyk checks are incomplete.

Status Scan Engine Critical High Medium Low Total (0)
⚠️ Open Source Security 0 0 0 0 See details
⚠️ Licenses 0 0 0 0 See details
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@kobergj
kobergj force-pushed the fix/OCISDEV-964-education-user-delete-uses-wrong-id branch from 9a85b63 to dd33931 Compare June 9, 2026 08:58
@mzner
mzner self-requested a review June 9, 2026 09:03
@kobergj
kobergj force-pushed the fix/OCISDEV-964-education-user-delete-uses-wrong-id branch 3 times, most recently from 2fd0f8c to c7b6e2e Compare June 11, 2026 07:05
kobergj and others added 3 commits June 11, 2026 09:09
Bumps golang.org/x/net to v0.55.0 and golang.org/x/image to v0.41.0 to
clear 8 govulncheck advisories (HTML/IDNA/BMP/TIFF) that started failing
CI on stable-8.0 after the vulnerability database was updated.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Julian Koberg <[email protected]>
Node 24.16.0 ships a yauzl regression that makes Playwright's post-download
zip extraction hang indefinitely, consuming the entire 6h job budget without
producing any output after the chromium download finishes.

Backported from master, see microsoft/playwright#40724.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Julian Koberg <[email protected]>
DeleteEducationUser called the LDAP backend with user.GetExternalID(),
while the regular /users handler and the pre-v8.0 code path used
user.GetId(). With the default RequireExternalID=false, the LDAP backend
looked up the user by name-or-UUID, so the externalID never matched, the
LDAP entry was never removed, and the response was a 404.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Signed-off-by: Julian Koberg <[email protected]>
@kobergj
kobergj force-pushed the fix/OCISDEV-964-education-user-delete-uses-wrong-id branch from c7b6e2e to 27c9de6 Compare June 11, 2026 07:09
@kobergj
kobergj merged commit b6dea02 into owncloud:stable-8.0 Jun 11, 2026
55 of 65 checks passed
@kobergj
kobergj deleted the fix/OCISDEV-964-education-user-delete-uses-wrong-id branch June 11, 2026 07:46
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