1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 02:02:41 +01:00
phorge-phorge/src/applications/differential/storage
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
..
__tests__ Replace ArcanistPhutilTestCase refs with PhutilTestCase 2015-05-20 09:40:39 +10:00
DifferentialAffectedPath.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
DifferentialChangeset.php Support arbitrarily long filenames in Differential 2016-12-15 11:35:15 -08:00
DifferentialCustomFieldNumericIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialCustomFieldStorage.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialCustomFieldStringIndex.php Various linter fixes. 2014-02-26 12:44:58 -08:00
DifferentialDAO.php Delete license headers from files 2012-11-05 11:16:51 -08:00
DifferentialDiff.php Use extended policies in Differential diffs 2017-01-01 09:56:30 -08:00
DifferentialDiffProperty.php Fix almost all remaining schemata issues 2014-10-01 08:18:36 -07:00
DifferentialDiffTransaction.php Differential - make DifferentialDiffEditor into a real transaction editor. 2014-11-18 15:32:23 -08:00
DifferentialDraft.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
DifferentialHiddenComment.php Allow inline comments to be individually hidden 2015-05-27 10:28:38 -07:00
DifferentialHunk.php Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
DifferentialInlineComment.php Modularize content sources 2016-03-26 11:59:45 -07:00
DifferentialLegacyHunk.php Rename DifferentialHunk subclasses for consistency 2015-01-23 07:17:04 +11:00
DifferentialModernHunk.php Rename DifferentialHunk subclasses for consistency 2015-01-23 07:17:04 +11:00
DifferentialReviewerProxy.php Rename "DifferentialReviewer" to "DifferentialReviewerProxy" 2016-12-13 14:35:35 -08:00
DifferentialRevision.php Order actions sensibly within Differential revision comment action groups 2016-12-31 10:10:05 -08:00
DifferentialSchemaSpec.php Automatically build all Lisk schemata 2014-10-02 09:51:20 -07:00
DifferentialTransaction.php Use a more conventional spelling of "CLOSED" 2017-01-01 09:27:50 -08:00
DifferentialTransactionComment.php Make inline comment preview and submission mostly work on EditEngine 2016-12-31 10:10:29 -08:00