openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

Mark the reason why a user was suspended/deleted

Open pablobm opened this issue 1 month ago • 6 comments

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 users add a new column suspension_reason character varying.
  • Add a "suspend for spam" action, which suspends the user and marks the suspension_reason as spam.

Edits:

  • 2025-11-24 Reworked proposal to incorporate feedback.

pablobm avatar Nov 19 '25 15:11 pablobm

We want to speed up the work for the admins, not slow it down!

tomhughes avatar Nov 19 '25 16:11 tomhughes

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.

Firefishy avatar Nov 19 '25 16:11 Firefishy

OK, I forgot the meaning of "hide" wasn't "suspend". So if I understand correctly what we should do is the following:

  • Status deleted should 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.

pablobm avatar Nov 19 '25 16:11 pablobm

Marking this as "Ready", but please let me know if my understanding is not correct.

pablobm avatar Nov 24 '25 15:11 pablobm

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.

pablobm avatar Nov 24 '25 15:11 pablobm

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.

pablobm avatar Nov 25 '25 14:11 pablobm