MDL-51261 admin: Support upgrade key requirement on the site upgrade

The upgrade key can be defined in the main config.php as
$CFG->upgradekey.  If it is defined there, then its value must be
provided every time the site is being upgraded, regardless the
administrator is logged in or not.
This commit is contained in:
David Mudrák 2015-09-10 00:39:43 +02:00
parent a277654f7f
commit 98b32c9e7e
5 changed files with 101 additions and 15 deletions

View file

@ -530,6 +530,18 @@ $CFG->admin = 'admin';
// any icon inside the pix/f folder. You can also set the customdescription field
// (shown above) and (for advanced use) the groups, string, and defaulticon fields.
//
// Upgrade key
//
// If the upgrade key is defined here, then the value must be provided every
// time the site is being upgraded, regardless the administrator is logged in
// or not. This prevents from anonymous access to the upgrade screens where the
// real authentication and authorization mechanisms must not be relied on.
//
// It is strongly recommended to use a value different from your real account
// password.
//
// $CFG->upgradekey = 'put_some_password-like_value_here';
//
//=========================================================================
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
//=========================================================================