You are here

private function NodeAccess::canUpdateOwnNode in Permissions by Term 8

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

File

src/Service/NodeAccess.php, line 210

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;
}