Differential - tighten up access of Differential data from other applications

Summary: Fixes T6790. Turn the old method into "new" (old signature) and "newEphemeral". Deploy "newEphemeral" as many places as possible; basically places we are not in the Differential application *and* have no intentions of ever saving the diff. These callsites are also all places we are just trying to get some changesets at the end of the day.

Test Plan: set differential application policy to 'administrators only'. viewed a commit in diffusion and it worked without any errors! i'm just using my thinkin' noodle on the other code paths.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6790

Differential Revision: https://secure.phabricator.com/D11020
This commit is contained in:
Bob Trahan
2014-12-19 14:54:15 -08:00
parent fe0c1adf0e
commit 8ac73b2bf3
7 changed files with 21 additions and 11 deletions

View File

@@ -22,8 +22,7 @@ final class DiffusionChangeController extends DiffusionController {
$drequest->updateSymbolicCommit($data['effectiveCommit']);
$raw_changes = ArcanistDiffChange::newFromConduit($data['changes']);
$diff = DifferentialDiff::newFromRawChanges(
$viewer,
$diff = DifferentialDiff::newEphemeralFromRawChanges(
$raw_changes);
$changesets = $diff->getChangesets();
$changeset = reset($changesets);