1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 10:52:41 +01:00
phorge-phorge/src/applications/differential/query
epriestley c207964036 Never raise policy exceptions for the omnipotent viewer
Summary:
Fixes T4109. If a revision has a bad `repositoryPHID` (for example, because the repository was deleted), `DifferentialRevisionQuery` calls `didRejectResult()` on it, which raises a policy exception, even if the viewer is omnipotent. This aborts the `MessageParser`, because it does not expect policy exceptions to be raised for an omnipotent viewer.

Fix this in two ways:

  # Never raise a policy exception for an omnipotent viewer. I think this is the expected behavior and a reasonable rule.
  # In this case, load the revision for an omnipotent viewer.

This feels a little gross, but it's the only place where we do this in the codebase right now. We can clean this up later on once it's more clear what the circumstances of checks like these are.

Test Plan: Set a revision to have an invalid `repositoryPHID`, ran message parser on it, got a clean parse.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4109

Differential Revision: https://secure.phabricator.com/D7603
2013-11-19 14:10:38 -08:00
..
DifferentialCommentQuery.php Put all DifferentialComment loading behind DifferentialCommentQuery 2013-06-21 12:51:18 -07:00
DifferentialDiffQuery.php Assign PHIDs to all diffs 2013-11-06 13:59:06 -08:00
DifferentialInlineCommentQuery.php Migrate all Differential inline comments to ApplicationTransactions 2013-10-19 05:03:25 -07:00
DifferentialRepositoryLookup.php Fix an issue with UUID query construction 2013-09-30 03:55:07 -07:00
DifferentialRevisionQuery.php Never raise policy exceptions for the omnipotent viewer 2013-11-19 14:10:38 -08:00
DifferentialRevisionSearchEngine.php Accommodate project reviewers in Differential search 2013-10-05 14:10:47 -07:00