diff --git a/core/modules/comment/src/Plugin/Action/DeleteComment.php b/core/modules/comment/src/Plugin/Action/DeleteComment.php index 7ca9afb..88d05b8 100644 --- a/core/modules/comment/src/Plugin/Action/DeleteComment.php +++ b/core/modules/comment/src/Plugin/Action/DeleteComment.php @@ -89,10 +89,7 @@ public function execute($entity = NULL) { */ public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) { /** @var \Drupal\comment\CommentInterface $object */ - $result = $object->status->access('delete', $account, TRUE) - ->andIf($object->access('update', $account, TRUE)); - - return $return_as_object ? $result : $result->isAllowed(); + return $object->access('delete', $account, $return_as_object); } }