Fixup "Groups: Allow coadmins to delete comments on posts"

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

View file

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