mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-55791 admin: maintenance mode access capability
Add capability to allow certain non-admin users through maintenance mode.
This commit is contained in:
parent
0344082208
commit
59c66f926f
7 changed files with 22 additions and 13 deletions
|
@ -2683,7 +2683,7 @@ function require_login($courseorid = null, $autologinguest = true, $cm = null, $
|
|||
}
|
||||
|
||||
// If the site is currently under maintenance, then print a message.
|
||||
if (!empty($CFG->maintenance_enabled) and !has_capability('moodle/site:config', $sysctx)) {
|
||||
if (!empty($CFG->maintenance_enabled) and !has_capability('moodle/site:maintenanceaccess', $sysctx)) {
|
||||
if ($preventredirect) {
|
||||
throw new require_login_exception('Maintenance in progress');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue