[wp-trac] [WordPress Trac] #57078: Reading terms from a public REST endpoint is forbidden in the editor unless you can edit them

WordPress Trac noreply at wordpress.org
Fri Nov 11 18:12:47 UTC 2022


#57078: Reading terms from a public REST endpoint is forbidden in the editor unless
you can edit them
--------------------------+-----------------------
 Reporter:  TJNowell      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:  5.9
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:  rest-api
--------------------------+-----------------------
Changes (by TimothyBlynJacobs):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 The default context is `view`. The Block Editor made the architectrual
 decision to set the default context to queries to use `edit`.

 The `edit` context allows exposing fields that are not public, even if the
 resource is public. For instance, the raw post content is exposed when
 requesting a resource with an `edit` context.

 There are a number of fields in the taxonomy endpoint that are not exposed
 publicly. If you don't need those more privileged fields, then you can
 query the resource using the `view` context.

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


More information about the wp-trac mailing list