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

WordPress Trac noreply at wordpress.org
Fri Dec 13 16:36:56 UTC 2019


#48556: Query for multiple post types not considering user permission to retrieve
private posts
--------------------------+---------------------
 Reporter:  leogermani    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.4
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by leogermani):

 Few observations on this ticket:

 1) It changes the query results, so it needs Dev Notes

 2) It also changes the SQL query, so it might break things for people
 filtering the query with "posts_where" filter, for example. Also needs to
 be in Dev Notes

 3) I made it in a way it only changes the query in the very specific case
 of this ticket. The code could be cleaner if we changed the way the query
 is built in every case, but I thought this would bring less problems for
 developers

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


More information about the wp-trac mailing list