kronusaturn / lw2-viewer

An alternative frontend for LessWrong 2.0
https://www.greaterwrong.com/
MIT License
61 stars 6 forks source link

Delete button uses wrong fields and should only be visible for comments without children #11

Closed Discordius closed 5 years ago

Discordius commented 5 years ago

Noticed you added delete + retract buttons on GW (maybe after seeing this open PR).

Looking at it, I noticed that our current API allows for two things that weren't intended, so we will probably change that soon, and figured I would let you know:

  1. Users should only be able to delete comments publicly, instead of privately. You achieve that by also setting the deletedPublic and deletedReason fields
  2. You should not be able to delete comments that have any children (since doing so hides them, and even when deleting publicly still collapses them, which gives any individual user too much control over other people's content)
kronusaturn commented 5 years ago

Fixed in da509ac4..729e8735

Discordius commented 5 years ago

Sorry, small miscommunication: You should set deletedPublic in addition to deleted, not instead of.