#19916 closed defect (bug) (duplicate)
wp.deleteComment, wp.editComment shoud work for authors
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | XML-RPC | Version: | 3.3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | max@… |
Description
wp.editComment, wp.deleteComment checks for 'moderate_comments' which authors dont have
Attachments (1)
Change History (6)
nprasath002 — 16 months ago
comment:2
in reply to:
↑ 1
;
follow-up:
↓ 3
nprasath002 — 16 months ago
Replying to maxcutler:
I think removing the cap check is the wrong approach. Instead of checking 'moderate_comments', it should really just check the 'edit_comment' meta-cap (which takes the comment ID as a parameter).
Thats what the patch does.
- Cc max@… added
Replying to nprasath002:
Thats what the patch does.
Ah yes, you are correct. Trac's patch context didn't show that there's a call to current_user_can( 'edit_comment', $comment_ID ) later in the method.
The error message for that later check should probably be revised to be more accurate, but otherwise I'm +1.
comment:4
nprasath002 — 15 months ago
- Resolution set to duplicate
- Status changed from new to closed
A combined patch is submitted in #17981

I think removing the cap check is the wrong approach. Instead of checking 'moderate_comments', it should really just check the 'edit_comment' meta-cap (which takes the comment ID as a parameter).