function export_access in Node export 5
Same name and namespace in other branches
- 5.2 export.module \export_access()
- 6 export.module \export_access()
1 call to export_access()
- export_menu in ./
export.module - Implementation of hook_menu().
File
- ./
export.module, line 64
Code
function 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');
// Check additional conditions
$access = $access && (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.
foreach (module_implements('export_access_alter') as $module) {
$function = $module . '_export_access_alter';
$function($access, $node);
}
return $access;
}