diff --git a/core/modules/block/src/BlockAccessControlHandler.php b/core/modules/block/src/BlockAccessControlHandler.php index 6160f84..93fb27c 100644 --- a/core/modules/block/src/BlockAccessControlHandler.php +++ b/core/modules/block/src/BlockAccessControlHandler.php @@ -100,7 +100,7 @@ protected function checkAccess(EntityInterface $entity, $operation, $langcode, A } if ($this->resolveConditions($conditions, 'and') !== FALSE) { // Delegate to the plugin. - $access = $entity->getPlugin()->access($account); + $access = $entity->getPlugin()->access('view', $account, TRUE); } else { $access = AccessResult::forbidden(); diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index e471d8a..f9ca564 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -2249,7 +2249,7 @@ public function access(AccountInterface $account = NULL) { $plugin = $this->getPlugin('access'); /** @var \Drupal\views\Plugin\views\access\AccessPluginBase $plugin */ if ($plugin) { - return $plugin->access($account); + return $plugin->access('view', $account); } // fallback to all access if no plugin.