Opened 16 years ago
Closed 15 years ago
#9144 closed defect (bug) (fixed)
dashboard: comments from private posts show up in recent comments list
Reported by: | Taimon | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Comments | Keywords: | has-patch featured |
Focuses: | Cc: |
Description
Comments that belong to private posts appear in the recent comments list on the dashboard, even if the current user doesn't have the appropriate capabilities to read the post.
Attachments (2)
Change History (18)
#2
@
16 years ago
- Keywords has-patch needs-testing added
Close #9144 as a dupe of this since this has a patch.
#5
follow-up:
↓ 11
@
16 years ago
- Keywords needs-patch added; recent comments private has-patch needs-testing removed
shouldn't the patch list 5 comments, always? the sql query should be changed, rather than the comments filtered out, no?
#6
@
16 years ago
- Milestone changed from 2.8 to Future Release
Punting due to feature freeze. Reconsider with next release.
#11
in reply to:
↑ 5
@
15 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Future Release to 3.0
- Severity changed from minor to normal
Replying to Denis-de-Bernardy:
shouldn't the patch list 5 comments, always? the sql query should be changed, rather than the comments filtered out, no?
It actually does. This patch is within a loop that pulls 50 comments at a time until it reaches 5 acceptable ones.
New patch attached that uses current_user_can().
The patch should be taken with a grain of salt, as I'm not really familiar with wordpress.