Disable web updater if ldap or shibboleth are installed - refs https://github.com/owncloud/core/issues/23913#issuecomment-213432232
This commit is contained in:
parent
a3813c55da
commit
f56be022a3
12
lib/base.php
12
lib/base.php
|
@ -341,10 +341,14 @@ class OC {
|
|||
$disableWebUpdater = $systemConfig->getValue('upgrade.disable-web', false);
|
||||
$tooBig = false;
|
||||
if (!$disableWebUpdater) {
|
||||
// count users
|
||||
$stats = \OC::$server->getUserManager()->countUsers();
|
||||
$totalUsers = array_sum($stats);
|
||||
$tooBig = ($totalUsers > 50);
|
||||
$apps = \OC::$server->getAppManager();
|
||||
$tooBig = $apps->isInstalled('user_ldap') || $apps->isInstalled('user_shibboleth');
|
||||
if (!$tooBig) {
|
||||
// count users
|
||||
$stats = \OC::$server->getUserManager()->countUsers();
|
||||
$totalUsers = array_sum($stats);
|
||||
$tooBig = ($totalUsers > 50);
|
||||
}
|
||||
}
|
||||
if ($disableWebUpdater || $tooBig) {
|
||||
// send http status 503
|
||||
|
|
Loading…
Reference in New Issue