You are here

function notifications_content_comment_access in Notifications 6.4

Notifications object access callback. Determine whether the specified user may view the specified comment.

1 string reference to 'notifications_content_comment_access'
notifications_content_notifications in notifications_content/notifications_content.module
Implementation of hook_notifications()

File

notifications_content/notifications_content.module, line 990
Subscriptions to content events

Code

function notifications_content_comment_access($comment, $account) {

  // User can access own comments, other comments if published and has access, or can administer comments
  return ($account->uid == $comment->uid || $comment->status == COMMENT_PUBLISHED && user_access('access comments', $account) || user_access('administer comments', $account)) && notifications_object_access('node', $comment->nid, $account);
}