You are here

private function NodeAccess::canUpdateOwnNode in Permissions by Term 8.2

Same name and namespace in other branches
  1. 8 src/Service/NodeAccess.php \Drupal\permissions_by_term\Service\NodeAccess::canUpdateOwnNode()

File

src/Service/NodeAccess.php, line 176

Class

NodeAccess
Class NodeAccess

Namespace

Drupal\permissions_by_term\Service

Code

private function canUpdateOwnNode($uid, $nodeType) {
  $user = $this
    ->getUserInstance($uid);
  if ($user
    ->hasPermission('edit own ' . $nodeType . ' content')) {
    return 1;
  }
  return 0;
}