summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/comment.module6
1 files changed, 5 insertions, 1 deletions
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;
}
}