diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php
index ba67aca..83f5a78 100644
--- a/core/modules/node/node.api.php
+++ b/core/modules/node/node.api.php
@@ -1,6 +1,7 @@
 <?php
 
 use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Session\AccountInterface;
 use Drupal\Component\Utility\String;
 use Drupal\Component\Utility\Xss;
 
@@ -180,8 +181,8 @@
  * @see node_access_rebuild()
  * @ingroup node_access
  */
-function hook_node_grants($account, $op) {
-  if (user_access('access private content', $account)) {
+function hook_node_grants(\Drupal\Core\Session\AccountInterface $account, $op) {
+  if ($account->hasPermission('access private content')) {
     $grants['example'] = array(1);
   }
   $grants['example_owner'] = array($account->id());
@@ -563,23 +564,24 @@ function hook_node_load($nodes, $types) {
  *
  * @ingroup node_access
  */
-function hook_node_access(\Drupal\node\NodeInterface $node, $op, $account, $langcode) {
+function hook_node_access(\Drupal\node\NodeInterface $node, $op, \Drupal\Core\Session\AccountInterface $account, $langcode) {
   $type = is_string($node) ? $node : $node->getType();
 
   $configured_types = node_permissions_get_configured_types();
   if (isset($configured_types[$type])) {
-    if ($op == 'create' && user_access('create ' . $type . ' content', $account)) {
+    if ($op == 'create' && $account->hasPermission('create ' . $type . ' content')) {
+    if ($op == 'create' && \
       return NODE_ACCESS_ALLOW;
     }
 
     if ($op == 'update') {
-      if (user_access('edit any ' . $type . ' content', $account) || (user_access('edit own ' . $type . ' content', $account) && ($account->id() == $node->getAuthorId()))) {
+      if ($account->hasPermission('edit any ' . $type . ' content') || ($account->hasPermission('edit own ' . $type . ' content') && ($account->id() == $node->getAuthorId()))) {
         return NODE_ACCESS_ALLOW;
       }
     }
 
     if ($op == 'delete') {
-      if (user_access('delete any ' . $type . ' content', $account) || (user_access('delete own ' . $type . ' content', $account) && ($account->id() == $node->getAuthorId()))) {
+      if ($account->hasPermission('delete any ' . $type . ' content') || ($account->hasPermission('delete own ' . $type . ' content') && ($account->id() == $node->getAuthorId()))) {
         return NODE_ACCESS_ALLOW;
       }
     }
