From bb055f90aa6465fcd47d8a4af5693d34a8a232a4 Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Mon, 13 Dec 2021 00:43:20 +0200 Subject: [PATCH] Fixup "Groups: Allow coadmins to delete comments on posts" --- Web/Models/Entities/Comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Models/Entities/Comment.php b/Web/Models/Entities/Comment.php index c10db7d6..f9422761 100644 --- a/Web/Models/Entities/Comment.php +++ b/Web/Models/Entities/Comment.php @@ -44,6 +44,6 @@ class Comment extends Post { return $this->getOwner()->getId() == $user->getId() || $this->getTarget()->getOwner()->getId() == $user->getId() || - $this->getTarget() instanceof Post && $this->getTarget()->getTargetWall() < 0; + $this->getTarget() instanceof Post && $this->getTarget()->getTargetWall() < 0 && (new Clubs)->get(abs($this->getTarget()->getTargetWall()))->canBeModifiedBy($user); } }