diff --git a/core/modules/shortcut/src/Plugin/Block/ShortcutsBlock.php b/core/modules/shortcut/src/Plugin/Block/ShortcutsBlock.php index cd54b01..5365099 100644 --- a/core/modules/shortcut/src/Plugin/Block/ShortcutsBlock.php +++ b/core/modules/shortcut/src/Plugin/Block/ShortcutsBlock.php @@ -35,7 +35,8 @@ public function build() { * {@inheritdoc} */ public function access(AccountInterface $account, $return_as_object = FALSE) { - return AccessResult::allowedIfHasPermission($account, 'access shortcuts'); + $access = AccessResult::allowedIfHasPermission($account, 'access shortcuts'); + return $return_as_object ? $access : $access->isAllowed(); } }