[wp-trac] [WordPress Trac] #48556: Query for multiple post types not considering user permission to retrieve private posts

WordPress Trac noreply at wordpress.org
Wed Jun 30 04:59:24 UTC 2021


#48556: Query for multiple post types not considering user permission to retrieve
private posts
-------------------------------------------------+-------------------------
 Reporter:  leogermani                           |       Owner:
                                                 |  peterwilsoncc
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.9
Component:  Query                                |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests early       |     Focuses:
  needs-dev-note commit                          |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51276" 51276]:
 {{{
 #!CommitTicketReference repository="" revision="51276"
 Query: Check each post-type's capabilities when querying multiple post-
 types.

 When querying multiple post types, check the `read_private_posts`
 capability for each post type when determining which post statuses to
 return. This ensures private posts appear in search results and archives
 for users permitted to read them.

 Props leogermani, hellofromTonya, jeffpaul, peterwilsoncc.
 Fixes #48556.
 }}}

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


More information about the wp-trac mailing list