Make WordPress Core

Changeset 43755


Ignore:
Timestamp:
10/18/2018 08:25:47 PM (6 years ago)
Author:
danielbachhuber
Message:

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.
Merges [42356] to the 5.0 branch.
Fixes #42303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php

    r43445 r43755  
    8282                }
    8383            }
    84             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() ) );
     84            return new WP_Error( 'rest_cannot_view', __( 'Sorry, you are not allowed to manage post statuses.' ), array( 'status' => rest_authorization_required_code() ) );
    8585        }
    8686
Note: See TracChangeset for help on using the changeset viewer.