You are here

function comment_perm_access in Comment Permissions 7.2

Same name and namespace in other branches
  1. 5 comment_perm.module \comment_perm_access()
  2. 6 comment_perm.module \comment_perm_access()
  3. 7 comment_perm.module \comment_perm_access()

Determine access to view comments for current node type.

Parameters

object $node: Node object.

Return value

bool TRUE - Current node type has permission access, FALSE otherwise.

1 call to comment_perm_access()
comment_perm_node_view_alter in ./comment_perm.module
Implements hook_node_view_alter().

File

./comment_perm.module, line 262
Control commenting permissions by role and by node type.

Code

function comment_perm_access($node) {
  return user_access("access comments {$node->type}");
}