[wp-trac] [WordPress Trac] #33154: Issues with Editing Comments where the post ID is zero or post is deleted

WordPress Trac noreply at wordpress.org
Fri Aug 7 03:06:15 UTC 2015


#33154: Issues with Editing Comments where the post ID is zero or post is deleted
-----------------------------+-----------------------------
 Reporter:  johnnietb        |       Owner:  pento
     Type:  defect (bug)     |      Status:  assigned
 Priority:  normal           |   Milestone:  4.2.5
Component:  Role/Capability  |     Version:  4.2.3
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:  administration
-----------------------------+-----------------------------

Comment (by dd32):

 Personally I see it as a bug that `current_user_can( 'edit_post', false )`
 would return anything other than `false`. If you want a primitive
 capability, you'd use `edit_posts`, calling `edit_post` without providing
 a valid post should always be false.

 However, failing to be able to edit a comment where the post doesn't exist
 does seem like a legitimate bug.
 It seems like, that `edit_comment` should use `edit_post` when the post
 exists, and failing that, falling back to `edit_posts`. `edit_posts` feels
 incorrect here though, but is the only real choice for backwards
 compatibility.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33154#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list