WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 4 months ago

#41037 new defect (bug)

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

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

Description

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

Change History (2)

#1 @meloniq
4 months ago

  • Keywords needs-patch added

Related #47024

#2 @SergeyBiryukov
4 months ago

  • Component changed from General to Comments
Note: See TracTickets for help on using tickets.