You are here

function simple_access_action_group_grant in Simple Access 5.2

Action to grant permissions to the owner

File

inc/workflow_ng.inc, line 197
Add workflow ng functionality to simple access

Code

function simple_access_action_group_grant($conf, $data) {
  $node = $data['data']['node'];
  foreach ($conf['sa_group_permissions'] as $gid => $group) {
    foreach (array_keys(array_filter($group)) as $option) {
      $node->simple_access[$gid][$option] = 1;
    }
  }
  return array(
    'node' => $node,
  );
}