You are here

function pm_node_grants in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 pm.module \pm_node_grants()

Implements hook_node_grants().

File

./pm.module, line 825
Main module file for the Project Management module.

Code

function pm_node_grants($account, $op) {
  $grants = array();
  foreach (pm_permission_get_enabled_types() as $type) {
    $grant_per_type = pm_permission_grants_list($account, $op, $type);
    if ($grant_per_type) {
      $grants += $grant_per_type;
    }
  }
  return $grants;
}