diff --git a/config.ini b/config.ini index a1c5ba91..dca175ab 100644 --- a/config.ini +++ b/config.ini @@ -88,7 +88,7 @@ deleteUser.all=nobody listComments=anonymous addComment=registered -deleteComment.self=registered +deleteComment.own=registered deleteComment.all=moderator listTags=anonymous diff --git a/src/Controllers/CommentController.php b/src/Controllers/CommentController.php index f1ab6267..28ba813f 100644 --- a/src/Controllers/CommentController.php +++ b/src/Controllers/CommentController.php @@ -90,6 +90,7 @@ class CommentController public function deleteAction($id) { $comment = Model_Comment::locate($id); + R::preload($comment, ['commenter' => 'user']); PrivilegesHelper::confirmWithException(Privilege::DeleteComment, PrivilegesHelper::getIdentitySubPrivilege($comment->commenter)); R::trash($comment); $this->context->transport->success = true; diff --git a/src/Views/comment-small.phtml b/src/Views/comment-small.phtml index 18b9d77c..db42fbb1 100644 --- a/src/Views/comment-small.phtml +++ b/src/Views/comment-small.phtml @@ -17,7 +17,7 @@ context->comment->commenter->name ?> -