Skip to content

Commit

Permalink
Merge branch '6.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Sep 20, 2017
2 parents e68693e + 606de28 commit ab984a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eZ/Publish/API/Repository/Tests/ContentServiceTest.php
Expand Up @@ -5325,7 +5325,7 @@ public function testRemoveTranslationLastLanguageThrowsBadStateException()
*
* @covers \eZ\Publish\Core\Repository\ContentService::removeTranslation
* @expectedException \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
* @expectedExceptionMessage User does not have access to 'delete' 'content'
* @expectedExceptionMessage User does not have access to 'remove' 'content'
*/
public function testRemoveTranslationThrowsUnauthorizedException()
{
Expand Down
4 changes: 2 additions & 2 deletions eZ/Publish/Core/Repository/ContentService.php
Expand Up @@ -1900,10 +1900,10 @@ public function removeTranslation(ContentInfo $contentInfo, $languageCode)
$versions = [];
foreach ($this->loadVersions($contentInfo) as $versionInfo) {
// check if user is authorized to delete Version
if (!$this->repository->canUser('content', 'delete', $versionInfo)) {
if (!$this->repository->canUser('content', 'remove', $versionInfo)) {
throw new UnauthorizedException(
'content',
'delete',
'remove',
[
'contentId' => $contentInfo->id,
'versionNo' => $versionInfo->versionNo,
Expand Down

0 comments on commit ab984a9

Please sign in to comment.