diff --git a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php index 37d7529..08fe715 100644 --- a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php +++ b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php @@ -135,8 +135,10 @@ public function workflowHasData(WorkflowInterface $workflow) { return (bool) $this->entityTypeManager ->getStorage('content_moderation_state') ->getQuery() - ->count() ->condition('workflow', $workflow->id()) + ->count() + ->accessCheck(FALSE) + ->range(0, 1) ->execute(); } @@ -147,9 +149,11 @@ public function workflowStateHasData(WorkflowInterface $workflow, StateInterface return (bool) $this->entityTypeManager ->getStorage('content_moderation_state') ->getQuery() - ->count() ->condition('workflow', $workflow->id()) ->condition('moderation_state', $state->id()) + ->count() + ->accessCheck(FALSE) + ->range(0, 1) ->execute(); }