diff --git a/Web/Presenters/CommentPresenter.php b/Web/Presenters/CommentPresenter.php index f9d8500f..c904c295 100644 --- a/Web/Presenters/CommentPresenter.php +++ b/Web/Presenters/CommentPresenter.php @@ -106,7 +106,7 @@ final class CommentPresenter extends OpenVKPresenter $comment = (new Comments)->get($id); if(!$comment) $this->notFound(); - if(!$comment->canBeDeletedBy($this->user)) + if(!$comment->canBeDeletedBy($this->user->identity)) $this->throwError(403, "Forbidden", "У вас недостаточно прав чтобы редактировать этот ресурс."); $comment->delete();