Skip to content

Commit

Permalink
Merge pull request #1506 from SerheyDolgushev/fix_self_edit_security_…
Browse files Browse the repository at this point in the history
…policy

EZP-31814: Self owner limitation in a security role breaks the UDW
  • Loading branch information
adamwojs authored Sep 25, 2020
2 parents 6bd4685 + 4aec03e commit f6f20d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Permission/PermissionChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]
);
Expand Down

0 comments on commit f6f20d5

Please # to comment.