HomePhabricator

Allow users to remove their own comments, and administrators to remove any…

Description

Allow users to remove their own comments, and administrators to remove any comment

Summary:
Fixes T4909. Adds a "remove" link next to the edit link, which permanently hides a comment. Addresses two use cases:

  • Allowing administrators to clean up spam.
  • Allowing users to try to put the genie back in the bottle if they post passwords or sensitive links, etc.

The user who removed the comment is named in the removal text to enforce some level of administrative accountability.

No data is deleted, but there's currently no method to restore these comments. We'll see if we need one.

This is cheating a little bit by storing "removed" as "2" in the isDeleted field. This doesn't seem tooooo bad for now.

Test Plan:

  • Removed some of my comments.
  • As an administrator, removed other users' comments.
  • Failed to view history of a removed comment.
  • Failed to edit a removed comment.
  • Failed to remove a removed comment.
  • Verified feed doesn't show the old comment after comment removal.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: qgil, chad, epriestley

Maniphest Tasks: T4909

Differential Revision: https://secure.phabricator.com/D8945

Event Timeline