You are here

private function NodeAccess::canDeleteOwnNode 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::canDeleteOwnNode()
1 call to NodeAccess::canDeleteOwnNode()
NodeAccess::canUserDeleteNode in src/Service/NodeAccess.php

File

src/Service/NodeAccess.php, line 185

Class

NodeAccess
Class NodeAccess

Namespace

Drupal\permissions_by_term\Service

Code

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