Make WordPress Core


Ignore:
Timestamp:
03/07/2015 05:59:17 AM (9 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/site-users.php

    r31517 r31658  
    5151$details = get_blog_details( $id );
    5252if ( ! can_edit_network( $details->site_id ) )
    53     wp_die( __( 'You do not have permission to access this page.' ) );
     53    wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
    5454
    5555$is_main_site = is_main_site( $id );
Note: See TracChangeset for help on using the changeset viewer.