Page MenuHomePhabricator

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

Authored by epriestley on Mar 2 2017, 9:27 PM.
Tags
None
Referenced Files
F13280834: D17453.diff
Sun, Jun 2, 9:22 AM
F13267269: D17453.diff
Wed, May 29, 3:05 AM
F13263728: D17453.id41965.diff
Mon, May 27, 11:50 AM
F13252621: D17453.diff
Sat, May 25, 1:54 AM
F13240404: D17453.id41964.diff
Wed, May 22, 1:57 PM
F13230398: D17453.diff
Mon, May 20, 10:56 PM
F13217112: D17453.id41967.diff
Sat, May 18, 3:41 AM
F13185031: D17453.diff
Sat, May 11, 2:31 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
interact2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 15869
Build 21002: Run Core Tests
Build 21001: arc lint + arc unit

Event Timeline

Locked task:

Screen Shot 2017-03-02 at 1.30.04 PM.png (982×1 px, 122 KB)

Override prompt (requires edit permission):

Screen Shot 2017-03-02 at 1.30.47 PM.png (982×1 px, 127 KB)

Can we get the name of the object somehow? "This task has been locked"

I think it's going to get a little gross, but I'll see what I can do.

  • Specialize all the strings for the object type.
  • Replace the "subscribe" specialization for the extension with an object type specialization.
This revision is now accepted and ready to land.Mar 3 2017, 12:40 AM
This revision was automatically updated to reflect the committed changes.