summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 17:17:43 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-22 17:17:43 +0200
commit1e400cc11388c38546c92cdaf882b03c47d11c2d (patch)
tree8b770fae1624b05193850cb01bfeb62ac747479f /lib/base.php
parenta3813c55dacb4df2a537dd0e7589f3014aa68780 (diff)
parentf56be022a339576ff973404440fe0f5cf808e817 (diff)
downloadnextcloud-server-1e400cc11388c38546c92cdaf882b03c47d11c2d.tar.gz
nextcloud-server-1e400cc11388c38546c92cdaf882b03c47d11c2d.zip
Merge pull request #24201 from owncloud/no-web-updater-for-ldap-and-shibboleth
Disable web updater if ldap or shibboleth are installed
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/base.php b/lib/base.php
index 8ea164a5007..0174627cb7f 100644
--- a/lib/base.php
+++ b/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