public function transfer(\SS_HTTPRequest $request)
{
$this->setCurrentActionType(self::ACTION_SNAPSHOT);
$params = $request->params();
$transfer = DNDataTransfer::get()->byId($params['Identifier']);
if (!$transfer || !$transfer->ID) {
throw new SS_HTTPResponse_Exception('Transfer not found', 404);
}
if (!$transfer->canView()) {
return Security::permissionFailure();
}
$environment = $transfer->Environment();
$project = $environment->Project();
if ($project->Name != $params['Project']) {
throw new LogicException("Project in URL doesn't match this deploy");
}
return $this->render(['CurrentTransfer' => $transfer, 'SnapshotsSection' => 1]);
}