From 4aec03e0b7b218ac56dab9065a5cf6bb1e9f1e85 Mon Sep 17 00:00:00 2001 From: Serhey Dolgushev Date: Wed, 26 Aug 2020 10:52:59 -0400 Subject: [PATCH] EZP-31814: Self owner limitation in a security role breaks the UDW --- src/lib/Permission/PermissionChecker.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Permission/PermissionChecker.php b/src/lib/Permission/PermissionChecker.php index 372d0b913c..a0ff1efe20 100644 --- a/src/lib/Permission/PermissionChecker.php +++ b/src/lib/Permission/PermissionChecker.php @@ -210,14 +210,14 @@ public function getContentCreateLimitations(Location $parentLocation): LookupLim public function getContentUpdateLimitations(Location $location): LookupLimitationResult { - $contentUpdateStruct = $this->contentService->newContentUpdateStruct(); + $contentInfo = $location->getContentInfo(); $versionBuilder = new VersionBuilder(); $versionBuilder->translateToAnyLanguageOf($this->getActiveLanguageCodes()); $versionBuilder->createFromAnyContentTypeOf($this->getContentTypeIds()); return $this->permissionResolver->lookupLimitations('content', 'edit', - $contentUpdateStruct, + $contentInfo, [$versionBuilder->build(), $location], [Limitation::CONTENTTYPE, Limitation::LANGUAGE] );