From b38a806c16a0209e111aa832b8dc12fded1471ce Mon Sep 17 00:00:00 2001 From: webchick Date: Wed, 27 Jul 2011 13:16:17 -0700 Subject: Drupal 7.5 --- modules/comment/comment.module | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/comment') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 8d0c3d362..9c31f4427 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -2681,6 +2681,10 @@ function comment_rdf_mapping() { */ function comment_file_download_access($field, $entity_type, $entity) { if ($entity_type == 'comment') { - return user_access('access comments') && $entity->status == COMMENT_PUBLISHED || user_access('administer comments'); + if (user_access('access comments') && $entity->status == COMMENT_PUBLISHED || user_access('administer comments')) { + $node = node_load($entity->nid); + return node_access('view', $node); + } + return FALSE; } } -- cgit v1.2.3