WordPress/wp-includes/rest-api
Rachel Baker 25bfff959f REST API: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch().
Use the rest_authorization_required_code() function to return a 401 status code when a permission callback fails due to a user not being logged in.

Merges [42421] to the 4.9 branch.

Props jaswrks.
Fixes #42828.

Built from https://develop.svn.wordpress.org/branches/4.9@42422


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-30 20:49:40 +00:00
..
endpoints REST API: Don’t remove unregistered properties from objects in schema. 2017-10-24 21:05:49 +00:00
fields Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-rest-request.php Docs: Replace HTTP links to stackoverflow.com in DocBlocks with HTTPS. 2017-07-30 14:52:44 +00:00
class-wp-rest-response.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-rest-server.php REST API: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch(). 2017-12-30 20:49:40 +00:00