Browse Source

Issue #2994996 by aangel: Field access check should test using language

merge-requests/2/head
Chi 5 years ago
parent
commit
904b13614e
  1. 2
      src/View/FieldViewBuilder.php

2
src/View/FieldViewBuilder.php

@ -53,9 +53,9 @@ class FieldViewBuilder {
$build = [];
$entity = $this->entityRepository->getTranslationFromContext($entity, $langcode);
$access = $check_access ? $entity->access('view', NULL, TRUE) : AccessResult::allowed();
if ($access->isAllowed()) {
$entity = $this->entityRepository->getTranslationFromContext($entity, $langcode);
if (!isset($entity->{$field_name})) {
// @todo Trigger error here.
return [];

Loading…
Cancel
Save