Skip to content

Conversation

@michaelstingl
Copy link

Description

DELETE__delete_user used userLogin (username) in the URL path, but LibreGraph API requires the user's UUID. This caused 404 errors when deleting users via _seeds-down-k6.js.

Fix: Add GET__get_users endpoint and auto-resolve UUID from username in DELETE__delete_user if only userLogin is provided.

Only graph-v1-users.ts is changed. No changes to client or test files needed. Backwards compatible - existing callers using { userLogin } continue to work.

Related Issue

How Has This Been Tested?

  • test environment: OpenCloud 4.1 (opencloud-rolling:4.1)
  • test case 1: pnpm build passes
  • test case 2: k6 run _seeds-up-k6.js - 100% checks passed (764/764)
  • test case 3: k6 run _seeds-down-k6.js - 100% checks passed (10/10), including ✓ client -> user.deleteUser - status

Before (from issue #10):

DELETE /graph/v1.0/users/perf-test-user-1 → 404
DELETE /graph/v1.0/users/perf-test-user-2 → 404

After (Loki access logs):

DELETE /graph/v1.0/users/d692d2d5-604c-42c0-ab9d-abccab6c5138 → 204
DELETE /graph/v1.0/users/1e63d2bd-c3ee-4770-9c88-0e1f7740f0b6 → 204

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

LibreGraph API requires UUID for user deletion, not username.
Added GET__get_users endpoint and auto-lookup in DELETE__delete_user
when only userLogin is provided.

Fixes opencloud-eu#10
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.

DELETE__delete_user uses username instead of UUID (404 on OpenCloud)

1 participant