diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index 672a0d1..ce813b6 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -391,4 +391,38 @@ public static function languageManager() {
     return static::$container->get('language_manager');
   }
 
+  /**
+   * Checks whether the current user has a given permission.
+   *
+   * @param string $permission
+   *   The permission to check the current user for.
+   *
+   * @return bool
+   *   TRUE if the user has access, else FALSE.
+   */
+  public static function userAccess($permission) {
+    if (($request = static::$container->get('request')) &&
+        ($account = $request->attributes->get('_account'))) {
+      return $account->hasPermission($permission);
+    }
+    // There is no account context so default to deny.
+    return FALSE;
+  }
+
+  /**
+   * Returns the current user account.
+   *
+   * @return \Drupal\Core\Session\AccountInterface|bool
+   *   The currently logged in user's account or FALSE if there is no account
+   *   or request in scope.
+   */
+  public static function currentAccount() {
+    if (($request = static::$container->get('request')) &&
+        ($account = $request->attributes->get('_account'))) {
+      return $account;
+    }
+    // There is no account context in scope.
+    return FALSE;
+  }
+
 }
diff --git a/core/modules/tour/tour.module b/core/modules/tour/tour.module
index affdc49..6bdd60e 100644
--- a/core/modules/tour/tour.module
+++ b/core/modules/tour/tour.module
@@ -73,7 +73,7 @@ function tour_library_info() {
  * Implements hook_toolbar().
  */
 function tour_toolbar() {
-  if (!user_access('access tour')) {
+  if (!Drupal::userAccess('access tour')) {
     return;
   }
 
@@ -107,7 +107,7 @@ function tour_toolbar() {
  * Implements hook_preprocess_HOOK() for page.tpl.php.
  */
 function tour_preprocess_page(&$variables) {
-  if (!user_access('access tour')) {
+  if (!Drupal::userAccess('access tour')) {
     return;
   }
 
