Changeset 43085 for trunk/src/wp-admin/includes/user.php
- Timestamp:
- 05/02/2018 01:07:00 AM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/user.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r43057 r43085 786 786 */ 787 787 function _wp_personal_data_export_page() { 788 if ( ! current_user_can( ' manage_options' ) ) {789 wp_die( esc_html__( 'Sorry, you are not allowed to manage privacyon this site.' ) );788 if ( ! current_user_can( 'export_others_personal_data' ) ) { 789 wp_die( __( 'Sorry, you are not allowed to export personal data on this site.' ) ); 790 790 } 791 791 … … 851 851 */ 852 852 function _wp_personal_data_removal_page() { 853 if ( ! current_user_can( 'delete_users' ) ) { 854 wp_die( esc_html__( 'Sorry, you are not allowed to manage privacy on this site.' ) ); 853 /* 854 * Require both caps in order to make it explicitly clear that delegating 855 * erasure from network admins to single-site admins will give them the 856 * ability to affect global users, rather than being limited to the site 857 * that they administer. 858 */ 859 if ( ! current_user_can( 'erase_others_personal_data' ) || ! current_user_can( 'delete_users' ) ) { 860 wp_die( __( 'Sorry, you are not allowed to erase data on this site.' ) ); 855 861 } 856 862 … … 918 924 */ 919 925 function _wp_privacy_hook_requests_page() { 920 add_submenu_page( 'tools.php', __( 'Export Personal Data' ), __( 'Export Personal Data' ), ' manage_options', 'export_personal_data', '_wp_personal_data_export_page' );921 add_submenu_page( 'tools.php', __( 'Remove Personal Data' ), __( 'Remove Personal Data' ), ' manage_options', 'remove_personal_data', '_wp_personal_data_removal_page' );926 add_submenu_page( 'tools.php', __( 'Export Personal Data' ), __( 'Export Personal Data' ), 'export_others_personal_data', 'export_personal_data', '_wp_personal_data_export_page' ); 927 add_submenu_page( 'tools.php', __( 'Remove Personal Data' ), __( 'Remove Personal Data' ), 'erase_others_personal_data', 'remove_personal_data', '_wp_personal_data_removal_page' ); 922 928 } 923 929
Note: See TracChangeset
for help on using the changeset viewer.