WordPress.org

Make WordPress Core

Ticket #44833: 44833.diff

File 44833.diff, 1012 bytes (added by mmuhsin, 3 years ago)
  • src/wp-admin/includes/ajax-actions.php

     
    43684368        }
    43694369
    43704370        if ( ! current_user_can( 'export_others_personal_data' ) ) {
    4371                 wp_send_json_error( __( 'Invalid request.' ) );
     4371                wp_send_json_error( __( 'Sorry, you do not have permission to perform this task.' ) );
    43724372        }
    43734373
    43744374        check_ajax_referer( 'wp-privacy-export-personal-data-' . $request_id, 'security' );
     
    45504550
    45514551        // Both capabilities are required to avoid confusion, see `_wp_personal_data_removal_page()`.
    45524552        if ( ! current_user_can( 'erase_others_personal_data' ) || ! current_user_can( 'delete_users' ) ) {
    4553                 wp_send_json_error( __( 'Invalid request.' ) );
     4553                wp_send_json_error( __( 'Sorry, you do not have permission to perform this task.' ) );
    45544554        }
    45554555
    45564556        check_ajax_referer( 'wp-privacy-erase-personal-data-' . $request_id, 'security' );