Skip to content

Admin route to delete an active account on request #471

Closed

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

  1. HMarzban commented on Oct 19, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-10-19

    An erased (soft-deleted) account must get no bell rows, as push and email already do.

    Built: one more check in the BEFORE INSERT trigger internal.skip_unopenable_notification on public.notifications, with paired migration 20261019120000_skip_notification_for_deleted_receiver. The trigger's channel filter was removed, so an alert with no channel, such as an email bounce, is gated too. It was checked on the local database in a rolled-back transaction, including a sabotage run.

    The work is in the maintainer's working tree and is not committed or pushed yet.

  2. HMarzban commented on Oct 19, 2026

    @HMarzban
    CollaboratorAuthor

    Fixed in the maintainer's working tree on main. It is not committed or pushed yet, so there is no commit to link. It ships with the next push. Closed at the maintainer's request, 2026-10-19.

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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions