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.

Built from https://develop.svn.wordpress.org/trunk@31658


git-svn-id: http://core.svn.wordpress.org/trunk@31639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Jeremy Felt
2015-03-07 06:00:28 +00:00
parent 3c4b95c1e3
commit 80d13281ed
11 changed files with 16 additions and 16 deletions

View File

@@ -17,7 +17,7 @@ if ( !is_multisite() )
wp_die( __( 'Multisite support is not enabled.' ) );
if ( ! current_user_can( 'manage_network' ) )
wp_die( __( 'You do not have permission to access this page.' ) );
wp_die( __( 'You do not have permission to access this page.' ), '', array( 'response' => 403 ) );
$title = __( 'Dashboard' );
$parent_file = 'index.php';