Make WordPress Core


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

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