|
@@ 1601-1607 (lines=7) @@
|
| 1598 |
|
); |
| 1599 |
|
} |
| 1600 |
|
|
| 1601 |
|
if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) { |
| 1602 |
|
throw new UnauthorizedException( |
| 1603 |
|
'content', |
| 1604 |
|
'versionremove', |
| 1605 |
|
array('contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo) |
| 1606 |
|
); |
| 1607 |
|
} |
| 1608 |
|
|
| 1609 |
|
$versionList = $this->persistenceHandler->contentHandler()->listVersions( |
| 1610 |
|
$versionInfo->contentInfo->id, |
|
@@ 1682-1691 (lines=10) @@
|
| 1679 |
|
$destinationLocation = $this->repository->getLocationService()->loadLocation( |
| 1680 |
|
$destinationLocationCreateStruct->parentLocationId |
| 1681 |
|
); |
| 1682 |
|
if (!$this->repository->canUser('content', 'create', $contentInfo, [$destinationLocation])) { |
| 1683 |
|
throw new UnauthorizedException( |
| 1684 |
|
'content', |
| 1685 |
|
'create', |
| 1686 |
|
[ |
| 1687 |
|
'parentLocationId' => $destinationLocationCreateStruct->parentLocationId, |
| 1688 |
|
'sectionId' => $contentInfo->sectionId, |
| 1689 |
|
] |
| 1690 |
|
); |
| 1691 |
|
} |
| 1692 |
|
|
| 1693 |
|
$defaultObjectStates = $this->getDefaultObjectStates(); |
| 1694 |
|
|
|
@@ 2005-2011 (lines=7) @@
|
| 2002 |
|
$this->repository->beginTransaction(); |
| 2003 |
|
try { |
| 2004 |
|
foreach ($this->loadVersions($contentInfo) as $versionInfo) { |
| 2005 |
|
if (!$this->repository->canUser('content', 'remove', $versionInfo)) { |
| 2006 |
|
throw new UnauthorizedException( |
| 2007 |
|
'content', |
| 2008 |
|
'remove', |
| 2009 |
|
['contentId' => $contentInfo->id, 'versionNo' => $versionInfo->versionNo] |
| 2010 |
|
); |
| 2011 |
|
} |
| 2012 |
|
|
| 2013 |
|
if (!in_array($languageCode, $versionInfo->languageCodes)) { |
| 2014 |
|
continue; |