Ensure access permissions to node comment

This commit is contained in:
Manuel Cillero 2017-07-26 11:54:56 +02:00
parent 6630f264ef
commit be34a0703f

View file

@ -170,7 +170,7 @@ function _nodecomment_comment_links(&$links, &$node, $teaser) {
// But the core comment does the same. // But the core comment does the same.
// Fixing this properly will require an advanced node access module. // Fixing this properly will require an advanced node access module.
$target_node = node_load($node->comment_target_nid); $target_node = node_load($node->comment_target_nid);
if ($target_node && nodecomment_is_readwrite($target_node)) { if ($target_node && $target_node->status == 1 && nodecomment_is_readwrite($target_node)) {
if (node_access('update', $node)) { if (node_access('update', $node)) {
$links['comment_edit'] = array( $links['comment_edit'] = array(
'title' => t('edit'), 'title' => t('edit'),