Ticket #34521: pemission-messages-on-admin-network.patch
| File pemission-messages-on-admin-network.patch, 10.8 KB (added by , 10 years ago) |
|---|
-
wp-admin/network/index.php
17 17 wp_die( __( 'Multisite support is not enabled.' ) ); 18 18 19 19 if ( ! current_user_can( 'manage_network' ) ) 20 wp_die( __( 'You do not have permissionto access this page.' ), 403 );20 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 21 21 22 22 $title = __( 'Dashboard' ); 23 23 $parent_file = 'index.php'; -
wp-admin/network/settings.php
17 17 wp_die( __( 'Multisite support is not enabled.' ) ); 18 18 19 19 if ( ! current_user_can( 'manage_network_options' ) ) 20 wp_die( __( 'You do not have permissionto access this page.' ), 403 );20 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 21 21 22 22 $title = __( 'Network Settings' ); 23 23 $parent_file = 'settings.php'; -
wp-admin/network/site-info.php
15 15 } 16 16 17 17 if ( ! current_user_can( 'manage_sites' ) ) { 18 wp_die( __( 'You do not have sufficient permissions to edit this site.' ));18 wp_die( __( 'You are not allowed to edit this site.' ), 403 ); 19 19 } 20 20 21 21 get_current_screen()->add_help_tab( array( … … 47 47 } 48 48 49 49 if ( ! can_edit_network( $details->site_id ) ) { 50 wp_die( __( 'You do not have permissionto access this page.' ), 403 );50 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 51 51 } 52 52 53 53 $parsed_scheme = parse_url( $details->siteurl, PHP_URL_SCHEME ); -
wp-admin/network/site-new.php
17 17 wp_die( __( 'Multisite support is not enabled.' ) ); 18 18 19 19 if ( ! current_user_can( 'manage_sites' ) ) 20 wp_die( __( 'You do not have sufficient permissions to add sites to this network.' ));20 wp_die( __( 'You are not allowed to add sites to this network.' ), 403 ); 21 21 22 22 get_current_screen()->add_help_tab( array( 23 23 'id' => 'overview', -
wp-admin/network/site-settings.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die( __( 'You do not have sufficient permissions to edit this site.' ));17 wp_die( __( 'You are not allowed to edit this site.' ), 403 ); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 44 44 } 45 45 46 46 if ( !can_edit_network( $details->site_id ) ) 47 wp_die( __( 'You do not have permissionto access this page.' ), 403 );47 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 48 48 49 49 $is_main_site = is_main_site( $id ); 50 50 -
wp-admin/network/site-themes.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ));17 wp_die( __( 'You are not allowed to manage themes for this site.' ), 403 ); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 67 67 } 68 68 69 69 if ( !can_edit_network( $details->site_id ) ) 70 wp_die( __( 'You do not have permissionto access this page.' ), 403 );70 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 71 71 72 72 $is_main_site = is_main_site( $id ); 73 73 -
wp-admin/network/site-users.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can('manage_sites') ) 17 wp_die( __('You do not have sufficient permissions to edit this site.'));17 wp_die( __( 'You are not allowed to edit this site.' ), 403 ); 18 18 19 19 $wp_list_table = _get_list_table('WP_Users_List_Table'); 20 20 $wp_list_table->prepare_items(); … … 60 60 } 61 61 62 62 if ( ! can_edit_network( $details->site_id ) ) 63 wp_die( __( 'You do not have permissionto access this page.' ), 403 );63 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 64 64 65 65 $is_main_site = is_main_site( $id ); 66 66 -
wp-admin/network/sites.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die( __( 'You do not have permissionto access this page.' ), 403 );17 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 18 18 19 19 $wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' ); 20 20 $pagenum = $wp_list_table->get_pagenum(); … … 91 91 } 92 92 93 93 if ( $current_site->blog_id == $id ) { 94 wp_die( __( 'You are not allowed to change the current site.' ) );94 wp_die( __( 'You are not allowed to change the current site.' ), 403 ); 95 95 } 96 96 97 97 $site_details = get_blog_details( $id ); … … 126 126 127 127 case 'deleteblog': 128 128 if ( ! current_user_can( 'delete_sites' ) ) 129 wp_die( __( 'You do not have permissionto access this page.' ), '', array( 'response' => 403 ) );129 wp_die( __( 'You are not allowed to access this page.' ), '', array( 'response' => 403 ) ); 130 130 131 131 $updated_action = 'not_deleted'; 132 132 if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) { … … 144 144 switch ( $doaction ) { 145 145 case 'delete': 146 146 if ( ! current_user_can( 'delete_site', $val ) ) 147 wp_die( __( 'You are not allowed to delete the site.' ) );147 wp_die( __( 'You are not allowed to delete the site.' ), 403 ); 148 148 149 149 $updated_action = 'all_delete'; 150 150 wpmu_delete_blog( $val, true ); … … 157 157 break; 158 158 } 159 159 } else { 160 wp_die( __( 'You are not allowed to change the current site.' ) );160 wp_die( __( 'You are not allowed to change the current site.' ), 403 ); 161 161 } 162 162 } 163 163 } else { … … 233 233 $msg = __( 'Site deleted.' ); 234 234 break; 235 235 case 'not_deleted': 236 $msg = __( 'You do not have permissionto delete that site.' );236 $msg = __( 'You are not allowed to delete that site.' ); 237 237 break; 238 238 case 'archiveblog': 239 239 $msg = __( 'Site archived.' ); -
wp-admin/network/themes.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( !current_user_can('manage_network_themes') ) 17 wp_die( __( 'You do not have sufficient permissions to manage network themes.' ));17 wp_die( __( 'You are not allowed to manage network themes.' ), 403 ); 18 18 19 19 $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); 20 20 $pagenum = $wp_list_table->get_pagenum(); … … 97 97 exit; 98 98 case 'delete-selected': 99 99 if ( ! current_user_can( 'delete_themes' ) ) { 100 wp_die( __( 'You do not have sufficient permissions to delete themes for this site.'));100 wp_die( __( 'You are not allowed to delete themes for this site.' ), 403 ); 101 101 } 102 102 103 103 check_admin_referer( 'bulk-themes' ); -
wp-admin/network/user-new.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can('create_users') ) 17 wp_die( __('You do not have sufficient permissions to add users to this network.'));17 wp_die( __( 'You are not allowed to add users to this network.' ), 403 ); 18 18 19 19 get_current_screen()->add_help_tab( array( 20 20 'id' => 'overview', … … 34 34 check_admin_referer( 'add-user', '_wpnonce_add-user' ); 35 35 36 36 if ( ! current_user_can( 'manage_network_users' ) ) 37 wp_die( __( 'You do not have permissionto access this page.' ), 403 );37 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 38 38 39 39 if ( ! is_array( $_POST['user'] ) ) 40 40 wp_die( __( 'Cannot create an empty user.' ) ); -
wp-admin/network/users.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( ! current_user_can( 'manage_network_users' ) ) 17 wp_die( __( 'You do not have permissionto access this page.' ), 403 );17 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 18 18 19 19 if ( isset( $_GET['action'] ) ) { 20 20 /** This action is documented in wp-admin/network/edit.php */ … … 23 23 switch ( $_GET['action'] ) { 24 24 case 'deleteuser': 25 25 if ( ! current_user_can( 'manage_network_users' ) ) 26 wp_die( __( 'You do not have permissionto access this page.' ), 403 );26 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 27 27 28 28 check_admin_referer( 'deleteuser' ); 29 29 … … 44 44 45 45 case 'allusers': 46 46 if ( !current_user_can( 'manage_network_users' ) ) 47 wp_die( __( 'You do not have permissionto access this page.' ), 403 );47 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 48 48 49 49 if ( ( isset( $_POST['action']) || isset($_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) { 50 50 check_admin_referer( 'bulk-users-network' ); … … 57 57 switch ( $doaction ) { 58 58 case 'delete': 59 59 if ( ! current_user_can( 'delete_users' ) ) 60 wp_die( __( 'You do not have permissionto access this page.' ), 403 );60 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 61 61 $title = __( 'Users' ); 62 62 $parent_file = 'users.php'; 63 63 require_once( ABSPATH . 'wp-admin/admin-header.php' ); … … 106 106 case 'dodelete': 107 107 check_admin_referer( 'ms-users-delete' ); 108 108 if ( ! ( current_user_can( 'manage_network_users' ) && current_user_can( 'delete_users' ) ) ) 109 wp_die( __( 'You do not have permissionto access this page.' ), 403 );109 wp_die( __( 'You are not allowed to access this page.' ), 403 ); 110 110 111 111 if ( ! empty( $_POST['blog'] ) && is_array( $_POST['blog'] ) ) { 112 112 foreach ( $_POST['blog'] as $id => $users ) {