diff --git a/src/Plugin/Block/MasqueradeBlock.php b/src/Plugin/Block/MasqueradeBlock.php
index 4898ce3..ad07be3 100644
--- a/src/Plugin/Block/MasqueradeBlock.php
+++ b/src/Plugin/Block/MasqueradeBlock.php
@@ -11,6 +11,7 @@ use Drupal\Core\Block\BlockBase;
 use Drupal\Core\Form\FormBuilderInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Access\AccessResult;
 use Drupal\masquerade\Masquerade;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -77,7 +78,8 @@ class MasqueradeBlock extends BlockBase implements ContainerFactoryPluginInterfa
    * {@inheritdoc}
    */
   protected function blockAccess(AccountInterface $account) {
-    return $account->hasPermission('masquerade as any user') && !$this->masquerade->isMasquerading();
+    $allowed = $account->hasPermission('masquerade as any user') && !$this->masquerade->isMasquerading();
+    return AccessResult::allowedIf($allowed);
   }
 
   /**
