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

WordPress Trac noreply at wordpress.org
Thu Mar 22 05:21:46 UTC 2018


#42202: REST API: no equivalent for `who=authors` to display potential authors
-------------------------+-----------------------
 Reporter:  iseulde      |       Owner:  joehoyle
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  5.0
Component:  REST API     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------
Changes (by dd32):

 * keywords:   => needs-patch
 * milestone:  Awaiting Review => 5.0


Comment:

 Bumping this to 5.0 since Gutenberg needs this in some form anyway.

 `/users?capability=publish_posts` seems like it'd be most consistent given
 there exists `/users?roles=author` already, however, it seems like it
 could create an expensive query fast :)

 It's worth noting that `who=authors` currently doesn't base on
 roles/capabilities (as per #16841), it's based on `user_level != 0`.
 So for Gutenbergs usage it'd probably be a query like
 `/users?capability=level_1,level_2,level_3,..., level_10` currently (and
 in future, `?capability=$some_custom_field_from_post_type_description`).
 It could also be implemented as `/users?capability_not=level_0`.

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


More information about the wp-trac mailing list