Skip to content

feat(api): allow admins to delete users via API - #1778

Open
mipapo wants to merge 1 commit into
getfider:mainfrom
Runalyze:feat/api-delete-user
Open

mipapo wants to merge 1 commit into
getfider:mainfrom
Runalyze:feat/api-delete-user

Conversation

@mipapo

@mipapo mipapo commented Nov 19, 2026

Copy link
Copy Markdown

Adds DELETE /api/v1/users/:userID (administrators only). It reuses the existing account deletion logic, generalised from DeleteCurrentUser to DeleteUser{UserID}. Returns 404 for unknown users.

Issue:

https://feedback.fider.io/posts/181/user-email-in-api-v1-users-options-to-delete-block-user-account

As we want to make everything absolutely gdpr compatible we need to be able to delete an user via the API. (By hand is no option). I would be happy to see this being merged soon. Please take a look at the open question regarding the "self deletion"

  • Reuses the existing account deletion logic: cmd.DeleteCurrentUser is generalised to cmd.DeleteUser{UserID}; the settings "delete my account" flow passes the current user's ID
  • Personal data is anonymised exactly as with self-deletion
  • Returns 404 for unknown user IDs
  • Removes the user from the UserList if enabled

Open question
Currently an admin could delete themself. Should there be a "block"?


Before you submit: PRs for new features that haven't been discussed and accepted may be closed. This isn't anti-AI — it's about reviewer burden and long-term maintainability. Please open an issue first. See discussion #1529.

Checklist

Adds DELETE /api/v1/users/:userID (administrators only). It reuses the
existing account deletion logic, generalised from DeleteCurrentUser to
DeleteUser{UserID}. Returns 404 for unknown users.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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