codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
378 stars 70 forks source link

Deleted user shows as a link in posts list but it's not actually a link #708

Open cellio opened 2 years ago

cellio commented 2 years ago

Currently visible on Judaism:

screenshot

The "posted by" text for the top question says "deleted user" and it's rendered as a link. Clicking on it does nothing visible. Hovering over it shows that the link is to https://judaism.codidact.com/categories/32#.

On the question, the user card shows it's a deleted user and there's no link:

screenshot

If there's nothing to link to, then we probably shouldn't linkify the name on the posts list.

(That said, as an admin I thought I could see deleted users' profile pages. This might have been a special deletion, though, so maybe this only happens in that case?)

cellio commented 2 years ago

I'm marking this medium because of the decoy link. It's a rare case and when that question isn't at the top of the posts list maybe it won't be that important. But I'm also hoping it's not hard.

ArtOfCode- commented 2 years ago

As a mod/admin you can see deleted user's profiles, not destroyed users. The former is a soft-delete; the latter is completely removed from the database. That said, completely destroying a user does cause issues like the 500 this was causing earlier fairly often, so I'm reconsidering whether we really need that ability or whether soft-deletes work just fine.

cellio commented 2 years ago

Ah, that was a destruction not a mere deletion. I forgot we had those. Maybe they cause too much trouble? If there are other effects of destruction (I believe there are), we can presumably still do those -- "destroy" becomes an action, not an account state, though the mod/admin-visible profile should probably indicate that this action was taken.