summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-27 13:19:38 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-27 13:19:38 -0700
commit1f124bf1accbad60b31a463ff59232d2f5626100 (patch)
treee8e899b5f9a2ea559982fd6b5db7302e428c198f /modules/comment
parentbdc2373eabb8729931032c007600ca69ab1c997f (diff)
parenteabb023933ac83947e5d238c4a83b1f5bdbcc738 (diff)
downloadbrdo-1f124bf1accbad60b31a463ff59232d2f5626100.tar.gz
brdo-1f124bf1accbad60b31a463ff59232d2f5626100.tar.bz2
Merge branch '7.4-security' into 7.x
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 393318a21..c17c5a6be 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2688,6 +2688,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;
}
}