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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user