Skip to content
Snippets Groups Projects

Issue #3386313 by kksandr: Fixed access check in entity label formatter

Closed Issue #3386313 by kksandr: Fixed access check in entity label formatter
2 unresolved threads
Closed kksandr requested to merge issue/drupal-3386313:3386313-label-formatter-2 into 11.x
2 unresolved threads

Closes #3386313

Merge request reports

Approval is optional
Code Quality is loading
Test summary results are being parsed

Closed by Lee RowlandsLee Rowlands 7 months ago (Nov 3, 2024 9:43pm UTC)

Merge details

  • The changes were not merged into 11.x.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

  • Dezső Biczó added 245 commits

    added 245 commits

    Compare with previous version

  • added 1 commit

    • fc9dabdc - Remove the link template check to keep support of uri callbacks

    Compare with previous version

  • 74 77 // entity type doesn't have a link template nor a valid
    75 78 // "uri_callback", so don't bother trying to output a link for the
    76 79 // rest of the referenced entities.
    77 $output_as_link = FALSE;
    78 }
    80 $elements[$delta]['#plain_text'] = $label;
    81 $cacheability->applyTo($elements[$delta]);
    82 continue;
    79 83 }
    80 84
    81 if ($output_as_link && isset($uri) && !$entity->isNew()) {
    85 $uri_access = $uri->access(return_as_object: TRUE);
    86 $cacheability->addCacheableDependency($uri_access);
    87 if ($uri_access->isAllowed()) {
    82 88 $elements[$delta] = [
  • added 1 commit

    • eba9330b - Extend do not override the array

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • 61 62 $output_as_link = $this->getSetting('link');
    62 63
    63 64 foreach ($this->getEntitiesToView($items, $langcode) as $delta => $entity) {
    65 $elements[$delta] = ['#entity' => $entity];
    64 66 $label = $entity->label();
    67 $cacheability = (new CacheableMetadata())->addCacheTags($entity->getCacheTags());
  • Dezső Biczó added 1 commit

    added 1 commit

    • 722ea431 - Use CacheableMetadata::createFromObject($entity) instead

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading