diff --git a/modules/recurring_events_registration/modules/recurring_events_reminders/recurring_events_reminders.module b/modules/recurring_events_registration/modules/recurring_events_reminders/recurring_events_reminders.module index 7982d2530be71ef4b4d691a7e9e2fb50440511fa..8ce06b97410307674d55c758e86a8d2031d23d70 100644 --- a/modules/recurring_events_registration/modules/recurring_events_reminders/recurring_events_reminders.module +++ b/modules/recurring_events_registration/modules/recurring_events_reminders/recurring_events_reminders.module @@ -137,6 +137,7 @@ function recurring_events_reminders_cron() { ->condition('reminder_date', NULL, 'IS NOT NULL') ->condition('reminder_sent', NULL, 'IS NULL') ->condition('reminder_date', time(), '<=') + ->accessCheck(FALSE) ->execute(); if (!empty($event_instances)) { diff --git a/modules/recurring_events_registration/recurring_events_registration.install b/modules/recurring_events_registration/recurring_events_registration.install index e950bff77b0fe3dd7fff605c83f16cc4888300bf..da89866f9738eb5040d2c96e2f7216968be313e5 100644 --- a/modules/recurring_events_registration/recurring_events_registration.install +++ b/modules/recurring_events_registration/recurring_events_registration.install @@ -116,6 +116,7 @@ function recurring_events_registration_update_8003() { $registration_values = $database->select($table_name) ->fields($table_name, [$id_key, $revision_key] + $reg_fields) + ->accessCheck(FALSE) ->execute() ->fetchAll(); @@ -123,6 +124,7 @@ function recurring_events_registration_update_8003() { $database->update($table_name) ->fields($update_fields) + ->accessCheck(FALSE) ->execute(); $field_storage_definition = $definition_manager->getFieldStorageDefinition('event_registration', 'eventseries'); @@ -166,11 +168,13 @@ function recurring_events_registration_update_8003() { $database->update($table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) + ->accessCheck(FALSE) ->execute(); $database->update($revision_table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) + ->accessCheck(FALSE) ->execute(); } } @@ -235,6 +239,7 @@ function recurring_events_registration_update_8006(&$sandbox) { $registrants = \Drupal::entityTypeManager() ->getStorage('registrant') ->getQuery() + ->accessCheck(FALSE) ->execute(); $sandbox['registrants'] = $registrants; @@ -302,6 +307,7 @@ function recurring_events_registration_update_8007() { $registration_values = $database->select($table_name) ->fields($table_name, [$id_key, $revision_key] + $reg_fields) ->condition('event_registration__registration', 1) + ->accessCheck(FALSE) ->execute() ->fetchAll(); @@ -310,6 +316,7 @@ function recurring_events_registration_update_8007() { $update_fields = array_fill_keys($reg_fields, NULL); $database->update($table_name) ->fields($update_fields) + ->accessCheck(FALSE) ->execute(); // Remove the existing registration field. @@ -349,12 +356,14 @@ function recurring_events_registration_update_8007() { $database->update($table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) + ->accessCheck(FALSE) ->execute(); $database->update($revision_table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) ->condition($revision_key, $value->{$revision_key}) + ->accessCheck(FALSE) ->execute(); } } @@ -443,6 +452,7 @@ function recurring_events_registration_update_8009() { $registration_values = $database->select($table_name) ->fields($table_name, [$id_key, $revision_key] + $reg_fields) ->condition('event_registration__registration', 1) + ->accessCheck(FALSE) ->execute() ->fetchAll(); @@ -451,6 +461,7 @@ function recurring_events_registration_update_8009() { $update_fields = array_fill_keys($reg_fields, NULL); $database->update($table_name) ->fields($update_fields) + ->accessCheck(FALSE) ->execute(); // Remove the existing registration field. @@ -490,12 +501,14 @@ function recurring_events_registration_update_8009() { $database->update($table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) + ->accessCheck(FALSE) ->execute(); $database->update($revision_table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) ->condition($revision_key, $value->{$revision_key}) + ->accessCheck(FALSE) ->execute(); } } diff --git a/modules/recurring_events_registration/recurring_events_registration.module b/modules/recurring_events_registration/recurring_events_registration.module index e5959ad625bafb27185560c9b9df72294de82dfc..41ceb8f50d729e026318b91e09fe0b30386ec106 100644 --- a/modules/recurring_events_registration/recurring_events_registration.module +++ b/modules/recurring_events_registration/recurring_events_registration.module @@ -428,6 +428,7 @@ function recurring_events_registration_registrant_insert(EntityInterface $entity ->condition('sourceEntityType', ['eventseries', 'eventinstance'], 'IN') ->condition('destinationEntityType', $entity_type) ->condition('destinationEntityBundle', $bundle) + ->accessCheck(FALSE) ->execute(); if (!empty($inherited_field_ids)) { diff --git a/modules/recurring_events_registration/src/Form/OrphanedEventRegistrantsForm.php b/modules/recurring_events_registration/src/Form/OrphanedEventRegistrantsForm.php index b89886b5fd764841dd554deaf480ad2340d5dac0..dbeb3fff06d0e3c1511b4966b5afae8d37ee7671 100644 --- a/modules/recurring_events_registration/src/Form/OrphanedEventRegistrantsForm.php +++ b/modules/recurring_events_registration/src/Form/OrphanedEventRegistrantsForm.php @@ -160,6 +160,7 @@ class OrphanedEventRegistrantsForm extends FormBase { ->condition('es.id', NULL, 'IS NULL') ->condition('ei.id', NULL, 'IS NULL'); $registrants = $query->condition($or_group) + ->accessCheck(FALSE) ->execute() ->fetchCol(); diff --git a/modules/recurring_events_registration/src/RegistrantListBuilder.php b/modules/recurring_events_registration/src/RegistrantListBuilder.php index 77dd3891c5e4f7217b518fd4f722794a67566d20..e4957762279a612a1dd8a7090edd600a9bbe1f93 100644 --- a/modules/recurring_events_registration/src/RegistrantListBuilder.php +++ b/modules/recurring_events_registration/src/RegistrantListBuilder.php @@ -177,7 +177,7 @@ class RegistrantListBuilder extends EntityListBuilder { if ($this->limit) { $query->pager($this->limit); } - return $query->execute(); + return $query->accessCheck(FALSE)->execute(); } } diff --git a/recurring_events.install b/recurring_events.install index 8918c3a5024d3c0a3b437d2025df8399afa3a022..59d86f06f533392e6c76f16328d9c83056359dc9 100644 --- a/recurring_events.install +++ b/recurring_events.install @@ -307,6 +307,7 @@ function recurring_events_update_8007() { $inherited_fields = $database->select('config', 'c') ->fields('c', ['name']) ->condition('name', 'recurring_events.field_inheritance.%', 'LIKE') + ->accessCheck(FALSE) ->execute() ->fetchCol(); $bundles = \Drupal::service('entity_type.bundle.info')->getBundleInfo('eventseries'); @@ -339,6 +340,7 @@ function recurring_events_update_8007() { } $database->delete('config') ->condition('name', 'recurring_events.field_inheritance.%', 'LIKE') + ->accessCheck(FALSE) ->execute(); } @@ -378,7 +380,7 @@ function recurring_events_update_8008() { function recurring_events_update_8009(&$sandbox) { // This is a multipass update. if (empty($sandbox['events'])) { - $events = \Drupal::entityQuery('eventinstance')->execute(); + $events = \Drupal::entityQuery('eventinstance')->accessCheck(FALSE)->execute(); $sandbox['events'] = $events; $sandbox['max'] = count($events); $sandbox['limit'] = 50; @@ -402,6 +404,7 @@ function recurring_events_update_8009(&$sandbox) { ->condition('sourceEntityType', 'eventseries') ->condition('destinationEntityType', $entity_type) ->condition('destinationEntityBundle', $bundle) + ->accessCheck(FALSE) ->execute(); if (!empty($inherited_field_ids)) { @@ -509,6 +512,7 @@ function recurring_events_update_8011() { $database->update($table) ->fields([$field => '']) ->isNull($field) + ->accessCheck(FALSE) ->execute(); } } @@ -526,6 +530,7 @@ function recurring_events_update_8011() { $database_values = $database->select($table_name) ->fields($table_name, array_merge([$id_key, $revision_key], $field_fields)) + ->accessCheck(FALSE) ->execute() ->fetchAll(); @@ -576,12 +581,14 @@ function recurring_events_update_8011() { $database->update($table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) + ->accessCheck(FALSE) ->execute(); $database->update($revision_table_name) ->fields($values_to_restore) ->condition($id_key, $value->{$id_key}) ->condition($revision_key, $value->{$revision_key}) + ->accessCheck(FALSE) ->execute(); } } diff --git a/recurring_events.module b/recurring_events.module index 1324508a3c664745fc694d57a839f200eb743839..cfe4749fd985f9cf49993be227bcf3cf89aabff9 100644 --- a/recurring_events.module +++ b/recurring_events.module @@ -381,7 +381,7 @@ function recurring_events_eventseries_type_delete(EntityInterface $entity) { ->condition($and_destination) ->condition($and_source); $query->condition($or); - $inherited_field_ids = $query->execute(); + $inherited_field_ids = $query->accessCheck(FALSE)->execute(); if (!empty($inherited_field_ids)) { $inherited_fields = \Drupal::entityTypeManager()->getStorage('field_inheritance')->loadMultiple($inherited_field_ids); @@ -403,7 +403,7 @@ function recurring_events_eventseries_type_delete(EntityInterface $entity) { ->condition($and_destination) ->condition($and_source); $query->condition($or); - $inherited_field_ids = $query->execute(); + $inherited_field_ids = $query->accessCheck(FALSE)->execute(); if (!empty($inherited_field_ids)) { $inherited_fields = \Drupal::entityTypeManager()->getStorage('field_inheritance')->loadMultiple($inherited_field_ids); @@ -428,7 +428,7 @@ function recurring_events_eventseries_type_delete(EntityInterface $entity) { ->condition($and_destination) ->condition($and_source); $query->condition($or); - $inherited_field_ids = $query->execute(); + $inherited_field_ids = $query->accessCheck(FALSE)->execute(); if (!empty($inherited_field_ids)) { $inherited_fields = \Drupal::entityTypeManager()->getStorage('field_inheritance')->loadMultiple($inherited_field_ids); diff --git a/src/EventCreationService.php b/src/EventCreationService.php index 1a716057af755b732dfd27a0ccb01fb1cec663cc..cb295ed4186237d46a3ffb51219f8e557f144378 100644 --- a/src/EventCreationService.php +++ b/src/EventCreationService.php @@ -707,13 +707,13 @@ class EventCreationService { if ($event->hasField('moderation_state') && $instance->hasField('moderation_state')) { $series_query = $this->entityTypeManager->getStorage('workflow')->getQuery()->accessCheck(FALSE); $series_query->condition('type_settings.entity_types.eventseries.*', $event->bundle()); - $series_workflows = $series_query->execute(); + $series_workflows = $series_query->accessCheck(FALSE)->execute(); $series_workflows = array_keys($series_workflows); $series_workflow = reset($series_workflows); $instance_query = $this->entityTypeManager->getStorage('workflow')->getQuery()->accessCheck(FALSE); $instance_query->condition('type_settings.entity_types.eventinstance.*', $instance->bundle()); - $instance_workflows = $instance_query->execute(); + $instance_workflows = $instance_query->accessCheck(FALSE)->execute(); $instance_workflows = array_keys($instance_workflows); $instance_workflow = reset($instance_workflows); diff --git a/src/EventInstanceListBuilder.php b/src/EventInstanceListBuilder.php index abfaa559446f8a6999661af176aa7ba4e2557ddd..4df170b575d35e167e4fef7e48168e3e92c11c23 100644 --- a/src/EventInstanceListBuilder.php +++ b/src/EventInstanceListBuilder.php @@ -149,7 +149,7 @@ class EventInstanceListBuilder extends EntityListBuilder { if ($this->limit) { $query->pager($this->limit); } - return $query->execute(); + return $query->accessCheck(FALSE)->execute(); } } diff --git a/src/EventInstanceStorage.php b/src/EventInstanceStorage.php index ed1ae7c32fa8651ecab95b4b488c434384d506ee..76e3586f8c5ab89d39c7c78f0dd370b6fcbeb5f5 100644 --- a/src/EventInstanceStorage.php +++ b/src/EventInstanceStorage.php @@ -51,6 +51,7 @@ class EventInstanceStorage extends SqlContentEntityStorage implements EventInsta return $this->database->update('eventinstance_revision') ->fields(['langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED]) ->condition('langcode', $language->getId()) + ->accessCheck(FALSE) ->execute(); } diff --git a/src/EventSeriesListBuilder.php b/src/EventSeriesListBuilder.php index b42d731d18e948b2b8fb5e4e20685fce9f1b5840..0eb011aba6d9782abe99ea837cba0ff58ad24c8c 100644 --- a/src/EventSeriesListBuilder.php +++ b/src/EventSeriesListBuilder.php @@ -156,7 +156,7 @@ class EventSeriesListBuilder extends EntityListBuilder { if ($this->limit) { $query->pager($this->limit); } - return $query->execute(); + return $query->accessCheck(FALSE)->execute(); } } diff --git a/src/EventSeriesStorage.php b/src/EventSeriesStorage.php index 858a69e308522f2de6374e22ff3a23aa55049661..852c6c49046d4a6b40052f62253a3c6dfc78fb78 100644 --- a/src/EventSeriesStorage.php +++ b/src/EventSeriesStorage.php @@ -51,6 +51,7 @@ class EventSeriesStorage extends SqlContentEntityStorage implements EventSeriesS return $this->database->update('eventseries_revision') ->fields(['langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED]) ->condition('langcode', $language->getId()) + ->accessCheck(FALSE) ->execute(); } diff --git a/src/Form/OrphanedEventInstanceForm.php b/src/Form/OrphanedEventInstanceForm.php index 70175b457aa1299ac267181340c2f7d10990af22..83508c60b091f4d48eead4c09f8333aeeb5f956b 100644 --- a/src/Form/OrphanedEventInstanceForm.php +++ b/src/Form/OrphanedEventInstanceForm.php @@ -156,6 +156,7 @@ class OrphanedEventInstanceForm extends FormBase { ->fields('efd', ['id']); $query->leftJoin('eventseries', 'es', 'efd.eventseries_id = es.id'); $instances = $query->condition('es.id', NULL, 'IS NULL') + ->accessCheck(FALSE) ->execute() ->fetchCol();