Skip to content

Commit

Permalink
Update Post.php (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrilyew authored Sep 16, 2023
1 parent 06f324f commit 2939936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Web/Models/Entities/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function canBeEditedBy(?User $user = NULL): bool
return false;

if($this->getTargetWall() > 0)
return $this->getPublicationTime()->timestamp() + WEEK > time();
return $this->getPublicationTime()->timestamp() + WEEK > time() && $user->getId() == $this->getOwner(false)->getId();

return $user->getId() == $this->getOwner(false)->getId();
}
Expand Down

0 comments on commit 2939936

Please sign in to comment.