public function publishVersionAction()
{
$version = Model\Version::getById($this->getParam("id"));
$asset = $version->loadData();
$currentAsset = Asset::getById($asset->getId());
if ($currentAsset->isAllowed("publish")) {
try {
$asset->setUserModification($this->getUser()->getId());
$asset->save();
$this->_helper->json(["success" => true]);
} catch (\Exception $e) {
$this->_helper->json(["success" => false, "message" => $e->getMessage()]);
}
}
$this->_helper->json(false);
}