1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00
phorge-phorge/src/applications/policy
epriestley 3058cae4b8 Allow task statuses to specify that either "comments" or "edits" are "locked"
Summary:
Ref T13249. See PHI1059. This allows "locked" in `maniphest.statuses` to specify that either "comments" are locked (current behavior, advisory, overridable by users with edit permission, e.g. for calming discussion on a contentious issue or putting a guard rail on things); or "edits" are locked (hard lock, only task owner can edit things).

Roughly, "comments" is a soft/advisory lock. "edits" is a hard/strict lock. (I think both types of locks have reasonable use cases, which is why I'm not just making locks stronger across the board.)

When "edits" are locked:

  - The edit policy looks like "no one" to normal callers.
  - In one special case, we sneak the real value through a back channel using PolicyCodex in the specific narrow case that you're editing the object. Otherwise, the policy selector control incorrectly switches to "No One".
  - We also have to do a little more validation around applying a mixture of status + owner transactions that could leave the task uneditable.

For now, I'm allowing you to reassign a hard-locked task to someone else. If you get this wrong, we can end up in a state where no one can edit the task. If this is an issue, we could respond in various ways: prevent these edits; prevent assigning to disabled users; provide a `bin/task reassign`; uh maybe have a quorum convene?

Test Plan:
  - Defined "Soft Locked" and "Hard Locked" statues.
  - "Hard Locked" a task, hit errors (trying to unassign myself, trying to hard lock an unassigned task).
  - Saw nice new policy guidance icon in header.

{F6210362}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13249

Differential Revision: https://secure.phabricator.com/D20165
2019-02-15 19:18:40 -08:00
..
__tests__ Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
application Allow different policy rules for different types of objects 2015-06-13 15:44:03 -07:00
capability Make "Can Interact" and logged-out users interact more gracefully 2017-03-09 08:50:57 -08:00
codex Allow task statuses to specify that either "comments" or "edits" are "locked" 2019-02-15 19:18:40 -08:00
config Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
constants Extend PhabricatorPolicyCodex interface to handle "interesting" policy defaults 2018-04-27 16:56:11 -07:00
controller Extend PhabricatorPolicyCodex interface to handle "interesting" policy defaults 2018-04-27 16:56:11 -07:00
editor Allow task statuses to specify that either "comments" or "edits" are "locked" 2019-02-15 19:18:40 -08:00
engineextension Allow *.search Conduit API methods to have data bulk-loaded by extensions 2016-07-31 11:15:18 -07:00
exception Modernize OAuthserver and provide more context on "no permission" exception 2015-09-03 10:05:23 -07:00
filter Improve UI/UX when users try to add an invalid card with Stripe 2019-02-09 05:54:42 -08:00
interface Require several advanced postgraduate degrees to understand object policies 2016-11-09 15:05:38 -08:00
management Update "bin/policy show" to use PolicyCodex 2017-04-11 15:21:18 -07:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Modernize "favorite project policies" setting 2016-06-04 14:42:11 -07:00
rule Fix flaky subscribers policy rule unit test 2016-12-11 12:27:57 -08:00
storage Extend PhabricatorPolicyCodex interface to handle "interesting" policy defaults 2018-04-27 16:56:11 -07:00
view Require several advanced postgraduate degrees to understand object policies 2016-11-09 15:05:38 -08:00