1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications/differential/controller
epriestley 65c1c758ed Use extended policies in Differential diffs
Summary:
Fixes T9648. Diffs currently use `return $this->getRevision()->getViewPolicy();` to inherit their revision's view policy.

After the introduction of object policies, this is wrong for policies like "Subscribers", because it means "Subscribers to this object, the diff". Since Diffs have no subscribers, this always fails.

Instead, use extended policies so that the object policy evaluates in the context of the correct object (the revision).

Test Plan:
  - Create a revision.
  - Subscribe `alice` to it.
  - Set view policy to "Subscribers".
  - View revision as `alice`.
  - Before patch: nonsense fatal about missing diff because of policy error.
  - After patch: `alice` can see the revision.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9648

Differential Revision: https://secure.phabricator.com/D17123
2017-01-01 09:56:30 -08:00
..
DifferentialChangesetViewController.php Update Differential edit pages to new UI 2016-03-30 12:45:59 -07:00
DifferentialController.php Merge "Table of Contents", "Local Commits", "Update History" and "Similar Revisions" 2016-06-30 18:50:52 -07:00
DifferentialDiffCreateController.php Update Differential edit pages to new UI 2016-03-30 12:45:59 -07:00
DifferentialDiffViewController.php Replace Differential Edit controller with EditEngine-driven EditPro controller 2016-12-14 07:27:39 -08:00
DifferentialInlineCommentEditController.php Rename Event "userPHID" to "hostPHID" 2016-07-13 15:39:55 -07:00
DifferentialRevisionCloseDetailsController.php Fix some issues with the "Explain Why" dialog 2016-05-30 09:52:35 -07:00
DifferentialRevisionEditController.php Rename Differenital "EditPro" controller back to "Edit" 2016-12-16 13:17:12 -08:00
DifferentialRevisionLandController.php Removed willProcessRequest from DifferentialRevisionLandController 2016-09-19 13:47:37 -04:00
DifferentialRevisionListController.php Update Differential for handleRequest 2015-10-11 08:18:42 -07:00
DifferentialRevisionOperationController.php Improve UX and messaging for certain errors when landing revisions 2015-12-27 08:01:20 -08:00
DifferentialRevisionViewController.php Use extended policies in Differential diffs 2017-01-01 09:56:30 -08:00