mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
Upgrade/Install: Ensure the current user can update core when saving the auto-update options.
See #51742. git-svn-id: https://develop.svn.wordpress.org/trunk@49593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5fa6731441
commit
33c782abeb
@ -1205,6 +1205,11 @@ if ( 'upgrade-core' === $action ) {
|
||||
require_once ABSPATH . 'wp-admin/admin-footer.php';
|
||||
|
||||
} 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' );
|
||||
|
||||
if ( isset( $_GET['value'] ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user