-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify post visibility when finding last visible post
- Loading branch information
1 parent
6929197
commit 1145333
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ def last_post_for(forem_user) | |
end | ||
|
||
def last_visible_post(forem_user) | ||
posts.approved_or_pending_review_for(forem_user).last | ||
posts.visible.approved_or_pending_review_for(forem_user).last | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
louiecaulfield
Author
|
||
end | ||
|
||
def moderator?(user) | ||
|
Could you please write a regression test for this so we can be sure that it doesn't happen again?