mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Merge branch 'wip-MDL-57007-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
79f15159da
@ -26,7 +26,6 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
die(); // No access from web!
|
||||
}
|
||||
|
||||
define('BEHAT_UTIL', true);
|
||||
define('CLI_SCRIPT', true);
|
||||
define('ABORT_AFTER_CONFIG', true);
|
||||
define('CACHE_DISABLE_ALL', true);
|
||||
|
@ -366,7 +366,11 @@ function has_capability($capability, context $context, $user = null, $doanything
|
||||
global $USER, $CFG, $SCRIPT, $ACCESSLIB_PRIVATE;
|
||||
|
||||
if (during_initial_install()) {
|
||||
if ($SCRIPT === "/$CFG->admin/index.php" or $SCRIPT === "/$CFG->admin/cli/install.php" or $SCRIPT === "/$CFG->admin/cli/install_database.php") {
|
||||
if ($SCRIPT === "/$CFG->admin/index.php"
|
||||
or $SCRIPT === "/$CFG->admin/cli/install.php"
|
||||
or $SCRIPT === "/$CFG->admin/cli/install_database.php"
|
||||
or (defined('BEHAT_UTIL') and BEHAT_UTIL)
|
||||
or (defined('PHPUNIT_UTIL') and PHPUNIT_UTIL)) {
|
||||
// we are in an installer - roles can not work yet
|
||||
return true;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user