function answers_access in Answers 5.2
Implementation of hook_access().
File
- ./
answers.module, line 52 - Enables the creation of question nodes that can be answered by posting answer nodes.
Code
function answers_access($op, $node) {
global $user;
if ($op == 'create') {
return user_access('create quests');
}
if ($op == 'update' || $op == 'delete') {
if (user_access('edit own quests') && $user->uid == $node->uid) {
return TRUE;
}
}
}