WordPress.org

Make WordPress Core

Changeset 49593


Ignore:
Timestamp:
11/13/2020 04:55:48 PM (2 weeks ago)
Author:
azaozz
Message:

Upgrade/Install: Ensure the current user can update core when saving the auto-update options.

See #51742.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/update-core.php

    r49592 r49593  
    12061206
    12071207} elseif ( 'core-major-auto-updates-settings' === $action ) {
     1208
     1209    if ( ! current_user_can( 'update_core' ) ) {
     1210        wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
     1211    }
     1212
    12081213    $redirect_url = self_admin_url( 'update-core.php' );
    12091214
Note: See TracChangeset for help on using the changeset viewer.