mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Wall: Fix deleting comments
This commit is contained in:
parent
bb055f90aa
commit
3cf0c54deb
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ final class CommentPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
$comment = (new Comments)->get($id);
|
$comment = (new Comments)->get($id);
|
||||||
if(!$comment) $this->notFound();
|
if(!$comment) $this->notFound();
|
||||||
if(!$comment->canBeDeletedBy($this->user))
|
if(!$comment->canBeDeletedBy($this->user->identity))
|
||||||
$this->throwError(403, "Forbidden", "У вас недостаточно прав чтобы редактировать этот ресурс.");
|
$this->throwError(403, "Forbidden", "У вас недостаточно прав чтобы редактировать этот ресурс.");
|
||||||
|
|
||||||
$comment->delete();
|
$comment->delete();
|
||||||
|
|
Loading…
Reference in a new issue