Wall: Fix deleting comments

This commit is contained in:
Maxim Leshchenko 2021-12-13 15:20:49 +02:00
parent bb055f90aa
commit 3cf0c54deb
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -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();