function simpleanswer_access in Answers 5.2
Implementation of hook_access(). TODO: find a way to keep answer nodes from showing up in Create Content list
File
- simpleanswer/
simpleanswer.module, line 54 - Adds a simple form to post a response/answer to questions using the answers module. This module does not display its content directly and requires the answers module to show its content.
Code
function simpleanswer_access($op, $node) {
global $user;
if ($op == 'create') {
return user_access('create responses');
}
if ($op == 'update' || $op == 'delete') {
if (user_access('edit own responses') && $user->uid == $node->uid) {
return TRUE;
}
}
}