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
F13185031: D17453.diff
Sat, May 11, 2:31 AM
F13176031: D17453.id41964.diff
Wed, May 8, 9:47 AM
F13174828: D17453.diff
Wed, May 8, 1:23 AM
Unknown Object (File)
Tue, May 7, 4:51 AM
Unknown Object (File)
Fri, May 3, 2:12 AM
Unknown Object (File)
Mon, Apr 29, 1:35 PM
Unknown Object (File)
Wed, Apr 24, 9:49 PM
Unknown Object (File)
Sun, Apr 21, 3:38 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.