Skip to content

Commit

Permalink
Merge branch '2.3' of ezsystems/ezplatform-admin-ui into 4.5 (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk authored Sep 5, 2023
2 parents fcb8a90 + 87793be commit 8f0bb4b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/UniversalDiscovery/UniversalDiscoveryProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public function getLocationPermissionRestrictions(Location $location): array
[Limitation::CONTENTTYPE, Limitation::LANGUAGE]
);

$updateLimitationsValues = $this->lookupLimitationsTransformer->getGroupedLimitationValues(
$lookupCreateLimitationsResult,
[Limitation::CONTENTTYPE, Limitation::LANGUAGE]
);

return [
'create' => [
'hasAccess' => $lookupCreateLimitationsResult->hasAccess,
Expand All @@ -201,6 +206,8 @@ public function getLocationPermissionRestrictions(Location $location): array
],
'edit' => [
'hasAccess' => $lookupUpdateLimitationsResult->hasAccess,
'restrictedContentTypeIds' => $updateLimitationsValues[Limitation::CONTENTTYPE],
'restrictedLanguageCodes' => $updateLimitationsValues[Limitation::LANGUAGE],
],
];
}
Expand Down

0 comments on commit 8f0bb4b

Please sign in to comment.