Make most Differential reads policy-aware

Summary: Ref T603. Makes the majority of reads policy aware (and pretty much all the important ones).

Test Plan:
  - Created a comment with `differential.createcomment`.
  - Created a new revision with `arc diff` in order to exercise `differential.creatediff`.
  - Created an inline comment with `differential.createinline`.
  - Added a comment to a revision.
  - Edited an inline comment.
  - Edited a revision.
  - Wrote "Depends on ..." in a summary, saved, verified link was created.
  - Browsed a file in Diffusion.
  - Got past the code I changed in the Releeph request thing.
  - Edited a Releeph request.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7136
This commit is contained in:
epriestley
2013-09-26 12:37:19 -07:00
parent 80378eb5f6
commit 9b3d7b0dba
16 changed files with 66 additions and 21 deletions

View File

@@ -233,6 +233,10 @@ final class ConduitAPI_diffusion_getcommits_Method
private function addDifferentialInformation(array $commits) {
$commit_phids = ipull($commits, 'commitPHID');
// TODO: (T603) This should be policy checked, either by moving to
// DifferentialRevisionQuery or by doing a followup query to make sure
// the matched objects are visible.
$rev_conn_r = id(new DifferentialRevision())->establishConnection('r');
$revs = queryfx_all(
$rev_conn_r,