Skip to content

Commit 4e5fdda

Browse files
Text Changes: Merge strings referring to list_users capability.
See #38857. git-svn-id: https://develop.svn.wordpress.org/trunk@39312 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ecb95b2 commit 4e5fdda

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/wp-admin/users.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
if ( ! current_user_can( 'list_users' ) ) {
1414
wp_die(
1515
'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
16-
'<p>' . __( 'Sorry, you are not allowed to browse users.' ) . '</p>',
16+
'<p>' . __( 'Sorry, you are not allowed to list users.' ) . '</p>',
1717
403
1818
);
1919
}

src/wp-includes/class-wp-xmlrpc-server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,7 @@ public function wp_getUsers( $args ) {
24762476
do_action( 'xmlrpc_call', 'wp.getUsers' );
24772477

24782478
if ( ! current_user_can( 'list_users' ) )
2479-
return new IXR_Error( 401, __( 'Sorry, you are not allowed to browse users.' ) );
2479+
return new IXR_Error( 401, __( 'Sorry, you are not allowed to list users.' ) );
24802480

24812481
$query = array( 'fields' => 'all_with_meta' );
24822482

src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function get_items_permissions_check( $request ) {
148148
}
149149

150150
if ( 'edit' === $request['context'] && ! current_user_can( 'list_users' ) ) {
151-
return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to edit users.' ), array( 'status' => rest_authorization_required_code() ) );
151+
return new WP_Error( 'rest_forbidden_context', __( 'Sorry, you are not allowed to list users.' ), array( 'status' => rest_authorization_required_code() ) );
152152
}
153153

154154
if ( in_array( $request['orderby'], array( 'email', 'registered_date' ), true ) && ! current_user_can( 'list_users' ) ) {

0 commit comments

Comments
 (0)