HomePhabricator

Allow task statuses to "lock" them, preventing additional comments and…

Description

Allow task statuses to "lock" them, preventing additional comments and interactions

Summary:
Ref T12335. See that task for discussion. Here are the behavioral changes:

  • Statuses can be flagged with locked, which means that tasks in that status are locked to further discussion and interaction.
  • A new "CAN_INTERACT" permission facilitates this. For most objects, "CAN_INTERACT" is just the same as "CAN_VIEW".
  • For tasks, "CAN_INTERACT" is everyone if the status is a normal status, and no one if the status is a locked status.
  • If a user doesn't have "Interact" permission:
    • They can not submit the comment form.
    • The comment form is replaced with text indicating "This thing is locked.".
    • The "Edit" workflow prompts them.

This is a mixture of advisory and hard policy checks but sholuld represent a reasonable starting point.

Test Plan: Created a new "Locked" status, locked a task. Couldn't comment, saw lock warning, saw lock prompt on edit. Unlocked a task.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12335

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