Merge pull request #24201 from owncloud/no-web-updater-for-ldap-and-shibboleth
Disable web updater if ldap or shibboleth are installed
This commit is contained in:
commit
1e400cc113
12
lib/base.php
12
lib/base.php
|
@ -341,10 +341,14 @@ class OC {
|
||||||
$disableWebUpdater = $systemConfig->getValue('upgrade.disable-web', false);
|
$disableWebUpdater = $systemConfig->getValue('upgrade.disable-web', false);
|
||||||
$tooBig = false;
|
$tooBig = false;
|
||||||
if (!$disableWebUpdater) {
|
if (!$disableWebUpdater) {
|
||||||
// count users
|
$apps = \OC::$server->getAppManager();
|
||||||
$stats = \OC::$server->getUserManager()->countUsers();
|
$tooBig = $apps->isInstalled('user_ldap') || $apps->isInstalled('user_shibboleth');
|
||||||
$totalUsers = array_sum($stats);
|
if (!$tooBig) {
|
||||||
$tooBig = ($totalUsers > 50);
|
// count users
|
||||||
|
$stats = \OC::$server->getUserManager()->countUsers();
|
||||||
|
$totalUsers = array_sum($stats);
|
||||||
|
$tooBig = ($totalUsers > 50);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($disableWebUpdater || $tooBig) {
|
if ($disableWebUpdater || $tooBig) {
|
||||||
// send http status 503
|
// send http status 503
|
||||||
|
|
Loading…
Reference in New Issue