From 63dc77a7fc5c286b6dd3ed567c4c85b52d964e3f Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Sun, 3 Dec 2017 20:48:35 +0000 Subject: [PATCH] REST API: Fix permissions error message in post statuses controller. The permissions error message when a request tries to fetch post statuses unauthenticated is incorrect. It was a copy/paste from elsewhere, as indicated by the use of "in this post type" where this is no post type referenced. Props schlessera. Fixes #42303. git-svn-id: https://develop.svn.wordpress.org/trunk@42356 602fd350-edb4-49c9-b593-d223f7449a82 --- .../endpoints/class-wp-rest-post-statuses-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php index c6aadddb18..ee9e77a18a 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php @@ -85,7 +85,7 @@ class WP_REST_Post_Statuses_Controller extends WP_REST_Controller { return true; } } - return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to edit posts in this post type.' ), array( 'status' => rest_authorization_required_code() ) ); + return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to manage post statuses.' ), array( 'status' => rest_authorization_required_code() ) ); } return true;