Mark the reason why a user was suspended/deleted
Problem
I order to build better spam detection mechanisms, we want the ability to easily reference past spam content.
However currently we can only do this approximately as, currently, when a user is suspended we do not store the reason for this in DB. When later we want to get metrics on how many accounts were suspended for spam, we have to resort to heuristics.
Similarly it's not possible to know if a user was self-deleted or was deleted for a different reason.
Proposal
Store the cause of suspension/deletion in DB.
Details:
- Implement https://github.com/openstreetmap/openstreetmap-website/issues/6546 to clarify interface.
- On the DB table
usersadd a new columnsuspension_reason character varying. - Add a "suspend for spam" action, which suspends the user and marks the
suspension_reasonasspam.
Edits:
- 2025-11-24 Reworked proposal to incorporate feedback.
We want to speed up the work for the admins, not slow it down!
I think if we change admin UI to use suspended state rather than deleted state that would be sufficient. Users who delete their account continue to use deleted status.
OK, I forgot the meaning of "hide" wasn't "suspend". So if I understand correctly what we should do is the following:
- Status
deletedshould only be reached by self-deleting users. - Admins should only be able to suspend, and the delete action should be removed.
If admins only have the option to suspend, this would make it easier to address @tomhughes's concern of too many clicks (if I understand him correctly). We can have "suspend for spam", "suspend for abuse", "suspend without reason", or something like that.
Marking this as "Ready", but please let me know if my understanding is not correct.
Actually rephrased the ticket now. If it's going to be ready, the description should be correct, instead of forcing implementers to read the thread.
A question: what's the UI to suspend a user currently? Is there any? From a quick look, seems like the spam check is the only code path leading to suspension at the moment.