Upgrade/Install: Ensure the current user can update core when saving the auto-update options.
See #51742. Built from https://develop.svn.wordpress.org/trunk@49593 git-svn-id: http://core.svn.wordpress.org/trunk@49331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0bc22bb1fc
commit
d817ad9b55
|
@ -1205,6 +1205,11 @@ if ( 'upgrade-core' === $action ) {
|
||||||
require_once ABSPATH . 'wp-admin/admin-footer.php';
|
require_once ABSPATH . 'wp-admin/admin-footer.php';
|
||||||
|
|
||||||
} elseif ( 'core-major-auto-updates-settings' === $action ) {
|
} elseif ( 'core-major-auto-updates-settings' === $action ) {
|
||||||
|
|
||||||
|
if ( ! current_user_can( 'update_core' ) ) {
|
||||||
|
wp_die( __( 'Sorry, you are not allowed to update this site.' ) );
|
||||||
|
}
|
||||||
|
|
||||||
$redirect_url = self_admin_url( 'update-core.php' );
|
$redirect_url = self_admin_url( 'update-core.php' );
|
||||||
|
|
||||||
if ( isset( $_GET['value'] ) ) {
|
if ( isset( $_GET['value'] ) ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-beta4-49592';
|
$wp_version = '5.6-beta4-49593';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue