Check if the current user has permission to edit current node I'm using Nodeaccess module to add permissions on specific nodes.
 in my .theme file I want to Check if the current user has permission to edit the current node.
I've found it and working great.

  $node = \Drupal\node\Entity\Node::load(NID);
  $user = \Drupal\user\Entity\User::load(\Drupal::currentUser()-&gt;id());
  $check = $node-&gt;access('update', $user);