Make WordPress Core


Ignore:
Timestamp:
03/07/2015 05:59:17 AM (7 years ago)
Author:
jeremyfelt
Message:

Return HTTP status code 403 in network admin when access is forbidden.

When the error message "You do not have permission to access this page" is used in network admin screens, return an HTTP status code of 403 to match. Previously: [30356] and [31300].

Props yo-l1982.

Fixes #31422.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/user-new.php

    r31517 r31658  
    3434    check_admin_referer( 'add-user', '_wpnonce_add-user' );
    3535    if ( ! current_user_can( 'manage_network_users' ) )
    36         wp_die( __( 'You do not have permission to access this page.' ) );
     36        wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
    3737
    3838    if ( ! is_array( $_POST['user'] ) )
Note: See TracChangeset for help on using the changeset viewer.