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

WordPress Trac noreply at wordpress.org
Thu Dec 17 16:15:55 UTC 2020


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

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


Comment:

 In [changeset:"49830" 49830]:
 {{{
 #!CommitTicketReference repository="" revision="49830"
 Query: Respect post-type specific capabilities when querying for multiple
 post types.

 After this change, the relevant `read_private_posts` capability is checked
 for
 each queried post type. This ensures that private posts appear in search
 and
 archive queries for users who have the ability to view those posts.

 Props leogermani.

 Fixes #13509, #48968, #48556.
 }}}

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


More information about the wp-trac mailing list