Skip to content

Admin route to delete an active account on request #471

Description

@HMarzban

Summary

After #412, the admin ghost-account delete refuses any account that is not a ghost. So there is no route that deletes an active account when its owner asks for that under the privacy promise. An operator must do it by hand today.

Fix

  1. Add an admin route, for example DELETE /api/admin/users/:id, behind the existing admin guard. Validate :id as a uuid.
  2. Export softDeleteUsers and call it for that one id.
  3. Refuse an admin. Revoke admin access first through public.admin_revoke_admin.
  4. Add the route to the OpenAPI admin paths and to apps/hocuspocus.server/API.md.

Acceptance

  • An admin can soft-delete one active, non-admin account, and every field above is cleared.
  • The route refuses an admin account with 409.
  • A non-uuid id answers the house 400.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ProfileSecuritySecurity, access control, and data exposure

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions