Skip to content
Snippets Groups Projects
Commit 2f55daa2 authored by Julian Pustkuchen's avatar Julian Pustkuchen
Browse files

Issue #3204475 by Anybody, DieterHolvoet, mauritsl, artis: Review access checks

parent a1c2dc19
Branches
Tags
1 merge request!1Issue #3204475: Review access checks
......@@ -9,4 +9,4 @@ existing_values_autocomplete_widget.autocomplete:
count: 15
entity_type_id: NULL
requirements:
_permission: 'administer nodes'
_permission: 'access content'
......@@ -39,8 +39,9 @@ class AutocompleteController extends ControllerBase {
$results = $query->execute()->fetchAllKeyed();
foreach ($results as $id => $value) {
/** @var \Drupal\Core\Entity\FieldableEntityInterface $entity */
$entity = $entity_type_manager->getStorage($entity_type_id)->load($id);
if ($entity->access('edit')) {
if ($entity->access('view') && $entity->get($field_name)->access('view')) {
$existing_values[$value] = [
'value' => $value,
'label' => $value,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment