I need to test if a given user (in my case, the currently logged-in user) has access to a given node for one of the existing operations.
In Drupal 7, I could use the following code.
if (node_access('view', $node, $account)) { // User is allowed to see the node. }
What is the equivalent code for Drupal 8?
I will be running this code from inside a _custom_access check for a specific route I am setting for my custom module.
Thank you!