|
@@ 1584-1590 (lines=7) @@
|
| 1581 |
|
); |
| 1582 |
|
} |
| 1583 |
|
|
| 1584 |
|
if (!$this->repository->canUser('content', 'versionremove', $versionInfo)) { |
| 1585 |
|
throw new UnauthorizedException( |
| 1586 |
|
'content', |
| 1587 |
|
'versionremove', |
| 1588 |
|
['contentId' => $versionInfo->contentInfo->id, 'versionNo' => $versionInfo->versionNo] |
| 1589 |
|
); |
| 1590 |
|
} |
| 1591 |
|
|
| 1592 |
|
$versionList = $this->persistenceHandler->contentHandler()->listVersions( |
| 1593 |
|
$versionInfo->contentInfo->id, |
|
@@ 1665-1674 (lines=10) @@
|
| 1662 |
|
$destinationLocation = $this->repository->getLocationService()->loadLocation( |
| 1663 |
|
$destinationLocationCreateStruct->parentLocationId |
| 1664 |
|
); |
| 1665 |
|
if (!$this->repository->canUser('content', 'create', $contentInfo, [$destinationLocation])) { |
| 1666 |
|
throw new UnauthorizedException( |
| 1667 |
|
'content', |
| 1668 |
|
'create', |
| 1669 |
|
[ |
| 1670 |
|
'parentLocationId' => $destinationLocationCreateStruct->parentLocationId, |
| 1671 |
|
'sectionId' => $contentInfo->sectionId, |
| 1672 |
|
] |
| 1673 |
|
); |
| 1674 |
|
} |
| 1675 |
|
|
| 1676 |
|
$defaultObjectStates = $this->getDefaultObjectStates(); |
| 1677 |
|
|
|
@@ 1989-1995 (lines=7) @@
|
| 1986 |
|
$this->repository->beginTransaction(); |
| 1987 |
|
try { |
| 1988 |
|
foreach ($this->loadVersions($contentInfo) as $versionInfo) { |
| 1989 |
|
if (!$this->repository->canUser('content', 'remove', $versionInfo)) { |
| 1990 |
|
throw new UnauthorizedException( |
| 1991 |
|
'content', |
| 1992 |
|
'remove', |
| 1993 |
|
['contentId' => $contentInfo->id, 'versionNo' => $versionInfo->versionNo] |
| 1994 |
|
); |
| 1995 |
|
} |
| 1996 |
|
|
| 1997 |
|
if (!in_array($languageCode, $versionInfo->languageCodes)) { |
| 1998 |
|
continue; |