You are here

function content_access_proccess_grant in Content Access 8

Same name and namespace in other branches
  1. 5 content_access.module \content_access_proccess_grant()
  2. 6 content_access.module \content_access_proccess_grant()
  3. 7 content_access.module \content_access_proccess_grant()

Process a grant, which means add priority, realm and other properties.

2 calls to content_access_proccess_grant()
content_access_get_type_grant in ./content_access.module
Returns the default grants for a given node type.
content_access_node_access_records in ./content_access.module
Implements hook_node_access_records().

File

./content_access.module, line 375
Content access module file.

Code

function content_access_proccess_grant($grant, $gid, NodeInterface $node) {
  $grant += [
    'grant_view' => 0,
    'grant_update' => 0,
    'grant_delete' => 0,
    'realm' => 'content_access_roles',
  ];
  $grant['gid'] = $gid;
  $grant['priority'] = content_access_get_settings('priority', $node
    ->getType());
  return $grant;
}