summaryrefslogtreecommitdiffstats
path: root/lib/private/Template
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-30 10:16:07 +0100
committerGitHub <noreply@github.com>2018-10-30 10:16:07 +0100
commitc9e6a9963760403fe16c55e53937243563e9fa75 (patch)
treef0405c27a6121ac5bd78a280e5ebc1e74e333411 /lib/private/Template
parent31ccf8580aa384fe9f6ca7a9d3d6efd5ea973b82 (diff)
parent85d9f06cb8873955c9ca7a74d5c758b831d56e71 (diff)
downloadnextcloud-server-c9e6a9963760403fe16c55e53937243563e9fa75.tar.gz
nextcloud-server-c9e6a9963760403fe16c55e53937243563e9fa75.zip
Merge pull request #12085 from nextcloud/add-gss-to-excluded-backends
add global site selector as user back-end which doesn't support password confirmation
Diffstat (limited to 'lib/private/Template')
-rw-r--r--lib/private/Template/JSConfigHelper.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index b691a8a64cb..ad9ff0b6757 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -70,6 +70,9 @@ class JSConfigHelper {
/** @var CapabilitiesManager */
private $capabilitiesManager;
+ /** @var array user back-ends excluded from password verification */
+ private $excludedUserBackEnds = ['user_saml' => true, 'user_globalsiteselector' => true];
+
/**
* @param IL10N $l
* @param Defaults $defaults
@@ -158,7 +161,7 @@ class JSConfigHelper {
$array = [
"oc_debug" => $this->config->getSystemValue('debug', false) ? 'true' : 'false',
"oc_isadmin" => $this->groupManager->isAdmin($uid) ? 'true' : 'false',
- "backendAllowsPasswordConfirmation" => $userBackend === 'user_saml'? 'false' : 'true',
+ "backendAllowsPasswordConfirmation" => !isset($this->excludedUserBackEnds[$userBackend]) ? 'true' : 'false',
"oc_dataURL" => is_string($dataLocation) ? "\"".$dataLocation."\"" : 'false',
"oc_webroot" => "\"".\OC::$WEBROOT."\"",
"oc_appswebroots" => str_replace('\\/', '/', json_encode($apps_paths)), // Ugly unescape slashes waiting for better solution