diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index 8fa59ea..cec7ab7 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -168,7 +168,7 @@
  * @see block_menu()
  */
 function _block_themes_access($theme) {
-  return user_access('administer blocks') && drupal_theme_access($theme);
+  return Drupal::currentUser()->hasPermission('administer blocks') && drupal_theme_access($theme);
 }
 
 /**
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockAccessController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockAccessController.php
index 9990a2e..169a576 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockAccessController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockAccessController.php
@@ -24,7 +24,7 @@
       return TRUE;
     }
     elseif (in_array($operation, array('update', 'delete'))) {
-      return user_access('administer blocks', $account);
+      return $account->hasPermission('administer blocks');
     }
   }
 
@@ -32,7 +32,7 @@
    * {@inheritdoc}
    */
   protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
-    return user_access('administer blocks', $account);
+    return $account->hasPermission('administer blocks');
   }
 
 }
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
index d64e3de..a5f098e 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
@@ -41,6 +41,7 @@
    */
   public function form(array $form, array &$form_state) {
     $block = $this->entity;
+    $account = $this->getCurrentUser();
 
     if ($this->operation == 'edit') {
       // @todo Remove this once https://drupal.org/node/1981644 is in.
@@ -106,14 +107,14 @@
         'js' => array(drupal_get_path('module', 'custom_block') . '/custom_block.js'),
       ),
       '#weight' => 20,
-      '#access' => $block->isNewRevision() || user_access('administer blocks'),
+      '#access' => $block->isNewRevision() || $account->hasPermission('administer blocks'),
     );
 
     $form['revision_information']['revision'] = array(
       '#type' => 'checkbox',
       '#title' => t('Create new revision'),
       '#default_value' => $block->isNewRevision(),
-      '#access' => user_access('administer blocks'),
+      '#access' => $account->hasPermission('administer blocks'),
     );
 
     // Check the revision log checkbox when the log textarea is filled in.
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeAccessController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeAccessController.php
index 95b74ac..150a688 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeAccessController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeAccessController.php
@@ -24,7 +24,7 @@
       return TRUE;
     }
     elseif (in_array($operation, array('update', 'delete'))) {
-      return user_access('administer blocks', $account);
+      return $account->hasPermission('administer blocks');
     }
   }
 
@@ -32,7 +32,7 @@
    * {@inheritdoc}
    */
   protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
-    return user_access('administer blocks', $account);
+    return $account->hasPermission('administer blocks');
   }
 
 }
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
index cdd7016..55a2f51 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Block/CustomBlockBlock.php
@@ -12,6 +12,7 @@
 use Drupal\Core\Annotation\Translation;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\Session\AccountInterface;
 use Drupal\block\Plugin\Type\BlockManager;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -41,6 +42,13 @@
   protected $moduleHandler;
 
   /**
+   * The Current User.
+   *
+   * @var \Drupal\Core\Session\AccountInterface.
+   */
+  protected $currentUser;
+
+  /**
    * Constructs a new CustomBlockBlock.
    *
    * @param array $configuration
@@ -53,12 +61,16 @@
    *   The Plugin Block Manager.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface
    *   The Module Handler.
+   * @param \Drupal\Core\Session\AccountInterface $account
+   * (optional) The account for which view access should be checked. Defaults to
+   *   the current user.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, BlockManager $block_manager, ModuleHandlerInterface $module_handler) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, BlockManager $block_manager, ModuleHandlerInterface $module_handler, AccountInterface $account = NULL) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
     $this->blockManager = $block_manager;
     $this->moduleHandler = $module_handler;
+    $this->currentUser = $container->get('current_user', $account);
   }
 
   /**
@@ -132,7 +144,7 @@
           '%uuid' => $uuid,
           '!url' => url('block/add')
         )),
-        '#access' => user_access('administer blocks')
+        '#access' => $this->currentUser->hasPermission('administer blocks')
       );
     }
   }
diff --git a/core/modules/block/lib/Drupal/block/Access/BlockThemeAccessCheck.php b/core/modules/block/lib/Drupal/block/Access/BlockThemeAccessCheck.php
index 97b53d4..0c882cd 100644
--- a/core/modules/block/lib/Drupal/block/Access/BlockThemeAccessCheck.php
+++ b/core/modules/block/lib/Drupal/block/Access/BlockThemeAccessCheck.php
@@ -28,7 +28,7 @@
    */
   public function access(Route $route, Request $request) {
     $theme = $request->attributes->get('theme');
-    return (user_access('administer blocks') && drupal_theme_access($theme)) ? static::ALLOW : static::DENY;
+    return (\Drupal::currentUser()->hasPermission('administer blocks') && drupal_theme_access($theme)) ? static::ALLOW : static::DENY;
   }
 
 }
diff --git a/core/modules/block/lib/Drupal/block/BlockAccessController.php b/core/modules/block/lib/Drupal/block/BlockAccessController.php
index 85f449e..2271746 100644
--- a/core/modules/block/lib/Drupal/block/BlockAccessController.php
+++ b/core/modules/block/lib/Drupal/block/BlockAccessController.php
@@ -55,7 +55,7 @@
    */
   protected function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) {
     if ($operation != 'view') {
-      return user_access('administer blocks', $account);
+      return $account->hasPermission('administer blocks');
     }
 
     // Deny access to disabled blocks.
diff --git a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
index 96f60b2..347b8de 100644
--- a/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
+++ b/core/modules/block/tests/modules/block_test/lib/Drupal/block_test/Plugin/Block/TestBlockInstantiation.php
@@ -34,7 +34,7 @@
    * {@inheritdoc}
    */
   public function access() {
-    return user_access('access content');
+    return \Drupal::currentUser()->hasPermission('access content');
   }
 
   /**
