Add a "default view" policy to Differential

Summary:
Ref T603. Allows the Differential view policy to be configured with a default.

I've omitted "edit" because I want to wait and see how comment/comment-action policies work out. I could imagine locking "edit" down to only the owner at some point, and providing a wider "interact" capability, or something like that, which would cover accept/reject/commandeer. Users in this group could still edit indirectly by commandeering first.

Test Plan: Created new revisions from the CLI and conduit.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7269
This commit is contained in:
epriestley
2013-10-09 13:58:00 -07:00
parent 650dc0cc30
commit 436a403357
8 changed files with 54 additions and 40 deletions

View File

@@ -32,8 +32,7 @@ final class DifferentialRevisionEditController extends DifferentialController {
return new Aphront404Response();
}
} else {
$revision = new DifferentialRevision();
$revision->attachRelationships(array());
$revision = DifferentialRevision::initializeNewRevision($viewer);
}
$aux_fields = $this->loadAuxiliaryFields($revision);