[wp-trac] [WordPress Trac] #42202: REST API: no equivalent for `who=authors` to display potential authors

WordPress Trac noreply at wordpress.org
Wed Apr 25 13:05:49 UTC 2018


#42202: REST API: no equivalent for `who=authors` to display potential authors
---------------------------------------------+-----------------------
 Reporter:  iseulde                          |       Owner:  pento
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  4.9.6
Component:  Users                            |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  rest-api
---------------------------------------------+-----------------------
Changes (by pento):

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


Comment:

 In [changeset:"43001" 43001]:
 {{{
 #!CommitTicketReference repository="" revision="43001"
 REST API: Add `who=authors` as a query parameter for `GET wp/v2/users`.

 Any WordPress user who can `edit_posts` of a post type with
 `show_in_rest=true` can query for authors. This maps to current WordPress
 behavior where a WordPress user who can view the Manage Posts view for a
 post type can see any WordPress user assigned to a post (whether published
 or draft).

 This implementation, over restricting `who=authors` to users with
 `list_users`, gives us future flexibility in displaying lists of posts. It
 still respects more restrictive permissions for `context=edit`.

 Props danielbachhuber.
 Fixes #42202.
 }}}

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


More information about the wp-trac mailing list