Make WordPress Core

Opened 7 years ago

Last modified 5 years ago

#41037 new defect (bug)

Comment author can't edit their comment(s) if they aren't the post author

Reported by: henrywright's profile henry.wright Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Comments Keywords: needs-patch
Focuses: Cc:


In map_meta_cap(), the edit_comment meta capability is eventually mapped to edit_others_posts which results in comment authors not being able to edit their own comment(s) if their comment(s) are on a different user's post.

Note 1: The issue is specific to the author role. The editor role doesn't see the issue because this role has the edit_others_posts cap.

Note 2: The problem doesn't exist if the comment author is also the post author. This is because, in such cases, edit_comment is mapped to either edit_published_posts or edit_posts

Attachments (2)

41037.diff (2.6 KB) - added by lipathor 5 years ago.
41037.2.diff (2.6 KB) - added by lipathor 5 years ago.

Download all attachments as: .zip

Change History (6)

#1 @meloniq
5 years ago

  • Keywords needs-patch added

Related #47024

#2 @SergeyBiryukov
5 years ago

  • Component changed from General to Comments

#3 @lipathor
5 years ago

I think i resolved issue. Please for review.

5 years ago

5 years ago

#4 @lipathor
5 years ago

There where an error in first patch, use second one please.

Note: See TracTickets for help on using tickets.