[wp-trac] [WordPress Trac] #44287: REST API: Declare user capability to perform actions using JSON Hyper Schema `targetSchema`

WordPress Trac noreply at wordpress.org
Wed Jun 20 00:01:46 UTC 2018


#44287: REST API: Declare user capability to perform actions using JSON Hyper
Schema `targetSchema`
---------------------------------------------+-----------------------
 Reporter:  danielbachhuber                  |       Owner:  pento
     Type:  enhancement                      |      Status:  assigned
 Priority:  normal                           |   Milestone:  4.9.7
Component:  Role/Capability                  |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:  rest-api
---------------------------------------------+-----------------------
Changes (by danielbachhuber):

 * keywords:  has-patch has-unit-tests => has-patch has-unit-tests commit
 * owner:  (none) => pento
 * status:  new => assigned


Comment:

 @TimothyBlynJacobs Thanks for updating.

 I've tested this patch by:

 1. Applying the patch locally:

 {{{
 grunt
 patch:https://core.trac.wordpress.org/attachment/ticket/44287/44287.1.patch
 grunt build
 }}}

 2. Disabling Gutenberg's existing shim:

 {{{
 -       add_filter( "rest_prepare_{$post_type}",
 'gutenberg_add_target_schema_to_links', 10, 3 );
 +       // add_filter( "rest_prepare_{$post_type}",
 'gutenberg_add_target_schema_to_links', 10, 3 );
 }}}

 3. Verifying that the following UI is present when creating a Post as an
 Administrator:
 * Author
 * Categories
 * Visibility
 * Sticky

 4. Verifying that aforementioned UI isn't present when creating a Post as
 a Contributor.

 I think this is good for commit.

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


More information about the wp-trac mailing list