Homec4science

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

Authored by epriestley <git@epriestley.com> on May 5 2014, 19:55.

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

Details

Committed
epriestley <git@epriestley.com>May 5 2014, 19:55
Pushed
aubortJan 31 2017, 17:16
Parents
rPH6bced2170e75: Allow structured destruction of Maniphest tasks
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH58f66fea804e: Allow users to remove their own comments, and administrators to remove any… (authored by epriestley <git@epriestley.com>).May 5 2014, 19:55