[wp-trac] [WordPress Trac] #56962: current_user_can( 'read_post' ) not working.

WordPress Trac noreply at wordpress.org
Thu Nov 24 13:52:26 UTC 2022


#56962: current_user_can( 'read_post' )  not working.
-----------------------------+----------------------
 Reporter:  jcorbin          |       Owner:  (none)
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Role/Capability  |     Version:  6.1
 Severity:  major            |  Resolution:  wontfix
 Keywords:  close            |     Focuses:
-----------------------------+----------------------

Comment (by pikamander2):

 @johnbillion - It's breaking behavior even if the previous behavior wasn't
 intended. The incorrect syntax previously returned false and now it
 returns true. That's a major change given that it's often used as a
 permission check.

 I'm fine with the behavior being changed, but I don't see anything in the
 error log that clearly indicates where the source of the problem is, and
 that's problematic for people whose sites are now breaking in
 unpredictable ways.

 Here are some links to other people experiencing the same issue, in
 addition to myself and the bug filer:

 https://stackoverflow.com/questions/74363261

 https://stackoverflow.com/questions/74443198

 Ideally, if one of those four capabilities (save_post, publish_post,
 edit_post, delete_post) is passed to current_user_can, it would be nice
 for it to write a clear message to the error log explaining what the
 problem is.

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


More information about the wp-trac mailing list