diff --git a/src/Model/Comment.php b/src/Model/Comment.php index bc2c3d2..0dd6eec 100755 --- a/src/Model/Comment.php +++ b/src/Model/Comment.php @@ -765,6 +765,20 @@ class Comment extends DataObject return $notSpam && (!$maxLevel || $this->Depth < $maxLevel); } + /** + * Proxy for checking whether the has permission to comment on the comment parent. + * + * @param Member $member Member to check + * + * @return boolean + */ + public function canPostComment($member = null) + { + return $this->Parent() + && $this->Parent()->exists() + && $this->Parent()->canPostComment($member); + } + /** * Returns the list of all replies *