Getting node user view permissions (Nodeaccess)
I am not sure if I fully understand your question but this is what I make out of it: you want to check if a certain user has access to a certain node, am I right?

If this is the case, this can easily be achieved with the following code:

// Use this if you want to load the current user.
global $user;
// Use this if you want to load a user by UID.
$user = user_load($uid);
// Load the node object.
$node = node_load($nid);
// Perform the access check.
if (node_access('view', $node, $user)) {
  // The user has permission.
}


You can read more about node_access in the Drupal docs.