/** * Checks if the Security token is allowed to delete a specific Comment. * * @param CommentInterface $comment * @return boolean */ public function canDelete(CommentInterface $comment) { if ($comment instanceof SignedCommentInterface) { if ($comment->getAuthor() == $this->securityContext->getToken()->getUser() || $this->securityContext->getToken()->getUser()->isVp()) { return true; } } return parent::canDelete($comment); }