function simple_access_group_revoke in Simple Access 8.3
Same name and namespace in other branches
- 6.2 simple_access.module \simple_access_group_revoke()
- 7.2 simple_access.module \simple_access_group_revoke()
Action to revoke permissions to the owner.
File
- ./
simple_access.module, line 767 - Builds simple access definition for content access.
Code
function simple_access_group_revoke($node, $context) {
foreach ($context['sa_group_permissions'] as $gid => $group) {
foreach (array_keys(array_filter($group)) as $option) {
$node->simple_access[$gid][$option] = 0;
}
// Add defaults.
$node->simple_access[$gid] += [
'view' => 0,
'update' => 0,
'delete' => 0,
];
}
}