function content_access_action_revoke_node_permissions in Content Access 6
Same name and namespace in other branches
- 7 content_access_rules/content_access_rules.rules.inc \content_access_action_revoke_node_permissions()
Action implementation: Revoke permissions for a node.
File
- ./
content_access.rules.inc, line 115 - Rules specific functions that expose content_access' API.
Code
function content_access_action_revoke_node_permissions($node, $settings) {
if (_content_access_rules_check_setting($node)) {
$ca_settings = array();
foreach (_content_access_get_operations() as $op) {
$settings += array(
$op => array(),
);
$ca_settings[$op] = array_diff(content_access_per_node_setting($op, $node), $settings[$op]);
}
content_access_save_per_node_settings($node, $ca_settings);
// A following node_save() updates the grants for us.
return array(
'node' => $node,
);
}
}