Skip to content

Commit 118c25f

Browse files
authored
IBX-2942: Added missing edit permission restriction in UDW response (#2109)
https://issues.ibexa.co/browse/IBX-2942
1 parent 30c6715 commit 118c25f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lib/UniversalDiscovery/UniversalDiscoveryProvider.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ public function getLocationPermissionRestrictions(Location $location): array
191191
[Limitation::CONTENTTYPE, Limitation::LANGUAGE]
192192
);
193193

194+
$updateLimitationsValues = $this->lookupLimitationsTransformer->getGroupedLimitationValues(
195+
$lookupCreateLimitationsResult,
196+
[Limitation::CONTENTTYPE, Limitation::LANGUAGE]
197+
);
198+
194199
return [
195200
'create' => [
196201
'hasAccess' => $lookupCreateLimitationsResult->hasAccess,
@@ -199,6 +204,8 @@ public function getLocationPermissionRestrictions(Location $location): array
199204
],
200205
'edit' => [
201206
'hasAccess' => $lookupUpdateLimitationsResult->hasAccess,
207+
'restrictedContentTypeIds' => $updateLimitationsValues[Limitation::CONTENTTYPE],
208+
'restrictedLanguageCodes' => $updateLimitationsValues[Limitation::LANGUAGE],
202209
],
203210
];
204211
}

0 commit comments

Comments
 (0)