You are here

function answers_create_answer_permission_p in Answers 7.4

Checks permissions access.

Return NULL if the current user does not have permission to create an answer to the question.

1 call to answers_create_answer_permission_p()
answers_node_view in ./answers.module
Implements hook_node_view().

File

./answers.module, line 402
The Answers module.

Code

function answers_create_answer_permission_p($question) {
  module_load_include('inc', 'answers', 'includes/answers.lock');
  global $user;
  $locked = answers_question_locked_p($question);
  return node_access('create', 'answers_answer') && (!$locked || user_access('manage answers content', $user));
}