Add DifferentialDiffQuery and change most callsites
Summary: Ref T603. This introduces a policy-aware DifferentialDiffQuery and converts most callsites. I've left unusual callsites (mostly: hard to get the viewer, unusual query, queries related to active diffs) alone for now, so this isn't exhaustive but hits 60-80% of sites. Test Plan: Created diff; created revision; viewed diffs and revisions; made additional conduit calls. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D6338
This commit is contained in:
@@ -12,7 +12,10 @@ final class DifferentialDiffViewController extends DifferentialController {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
|
||||
$diff = id(new DifferentialDiff())->load($this->id);
|
||||
$diff = id(new DifferentialDiffQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs(array($this->id))
|
||||
->executeOne();
|
||||
if (!$diff) {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user