function node_export_access in Node export 6.2
Check menu access to export a node.
1 call to node_export_access()
1 string reference to 'node_export_access'
- node_export_menu in ./
node_export.module - Implementation of hook_menu().
File
- ./
node_export.module, line 68 - The Node Export module.
Code
function node_export_access($node) {
global $user;
// Check basic permissions first.
$access = user_access('export node') || $user->uid && $node->uid == $user->uid && user_access('export own nodes');
// Make sure the user can view the original node content.
$access = $access && node_access('view', $node);
// Check additional conditions
$access = $access && (node_export_is_permitted($node->type) && filter_access($node->format) && node_access('create', $node->type));
// Let other modules alter this - for exmple to only allow some users
// to export specific nodes or types.
drupal_alter("node_export_access", $access, $node);
return $access;
}