function story_access in Drupal 4
Implementation of hook_access().
File
- modules/
story.module, line 48 - Enables users to submit stories, articles or similar content.
Code
function story_access($op, $node) {
global $user;
if ($op == 'create') {
return user_access('create stories');
}
if ($op == 'update' || $op == 'delete') {
if (user_access('edit own stories') && $user->uid == $node->uid) {
return TRUE;
}
}
}