Merge pull request #214 from fullscreeninteractive/wilr-patch-1

If user cannot view record then prevent comment
This commit is contained in:
Will Rossiter 2017-09-13 08:36:18 +12:00 committed by GitHub
commit 4e2d22e16d

View File

@ -364,6 +364,11 @@ class CommentsExtension extends DataExtension
return false;
}
if (!$this->owner->canView($member)) {
// deny if current user cannot view the underlying record.
return false;
}
// Check if member is required
$requireLogin = $this->owner->CommentsRequireLogin;
if (!$requireLogin) {