Skip to content
Snippets Groups Projects
Commit 1422694e authored by Aaron Bauman's avatar Aaron Bauman Committed by Aaron Bauman
Browse files

Issue #3351606 by AaronBauman: Entity queries must explicitly set whether the...

Issue #3351606 by AaronBauman: Entity queries must explicitly set whether the query should be access checked or not
parent e4a83ccf
No related branches found
No related tags found
No related merge requests found
......@@ -111,6 +111,7 @@ class RelatedTermString extends SalesforceMappingFieldPluginBase {
foreach ($field_values as $field_value) {
// Look for a term that matches the string in the salesforce field.
$query = \Drupal::entityQuery('taxonomy_term');
$query->accessCheck(FALSE);
$query->condition('vid', $vocabs, 'IN');
$query->condition('name', $field_value);
$tids = $query->execute();
......
......@@ -18,6 +18,7 @@ class UniqueFieldsConstraintValidator extends ConstraintValidator {
$id_key = $entity_type->getKey('id');
$query = \Drupal::entityQuery($entity_type->id())
->accessCheck(FALSE);
// The id could be NULL, so we cast it to 0 in that case.
->condition($id_key, (int) $entity->id(), '<>')
->range(0, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment