Delete known user on approvals?

AI-generated summary

The discussion revolves around the “Delete User” button on the approvals page. watchmanmonitor questioned the functionality of the button, suggesting it should only be visible if the user can be deleted. codinghorror agreed and proposed a simple check to only show the button for users with trust level 0 (TL0). cpradio thought the button only appeared under specific conditions, but eviltrout confirmed it currently always shows up. watchmanmonitor noted the inconsistent behavior of the delete button on the user page. cpradio suggested limiting the button to TL1 users with less than a certain number of posts, but codinghorror opted for a more conservative approach, limiting it to TL0 users. eviltrout implemented this change with a GitHub commit.

I wonder, what would happen if I were to click the Delete User button on a user with posts?

I wonder what would happen if I were to click Delete User on my admin account?

Perhaps those buttons should only be there if the user is in a delete-able state?

1 Mi Piace

I agree with this, maybe a simple check is to not show the button unless the user is tl0.

2 Mi Piace

I thought it only showed up when specific conditions were met anyway… Such as less than 2 posts and within X number of days since account creation? Maybe I’m thinking of something else though.

Possibly @eviltrout can you confim the conditions under which Delete User appears in the post approval UI?

Looks like it always shows up now. It might be tricky to pull up all the conditions as to whether a user can be deleted, since it involves counting posts + more?

1 Mi Piace

When I’m in the admin on a user’s page, sometimes the delete button is there, sometimes it’s not. Is the code which controls that available in the Approvals page?

Just to be fair, I don’t mind if it is only shown for TL 1 and below with less than X posts. It isn’t hard to get out of TL 1 (in fact, I think you can do it without posting?). So I would not want to see it limited to TL 0. It should definitely include TL 1 (although I agree most spammers do not get out of TL 0).

For now just limit it to showing that button only on TL0 users please.

1 Mi Piace

This should do it:

https://github.com/discourse/discourse/commit/8f0cd18d4b8ac77b9aaac860ed4e53223f316f7a

3 Mi Piace