35 $checkPermissionsResponse =
38 $elementRight = $checkPermissionsResponse->getElementRight();
39 $response->fillFromResponse($checkPermissionsResponse);
41 if ($response->isSuccess())
44 ($elementId !== 0 && !$elementRight?->canRead())
45 || ($elementId === 0 && !$elementRight?->canAdd())
48 $response->addError(self::getAccessDeniedError());