#19916 closed defect (bug) (duplicate)
wp.deleteComment, wp.editComment shoud work for authors
Reported by: | nprasath002 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3.1 |
Component: | XML-RPC | Keywords: | has-patch |
Focuses: | Cc: |
Description
wp.editComment, wp.deleteComment checks for 'moderate_comments' which authors dont have
Attachments (1)
Change History (6)
#2
in reply to:
↑ 1
;
follow-up:
↓ 3
@
13 years 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.
#3
in reply to:
↑ 2
@
13 years ago
- 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.
Note: See
TracTickets for help on using
tickets.
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).