Skip to content

Commit

Permalink
Disable web updater if ldap or shibboleth are installed - refs #23913…
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Apr 22, 2016
1 parent a3813c5 commit f56be02
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,14 @@ private static function printUpgradePage() {
$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
Expand Down

0 comments on commit f56be02

Please sign in to comment.