aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Template/JSConfigHelper.php
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2018-01-03 11:48:45 +0100
committerGitHub <noreply@github.com>2018-01-03 11:48:45 +0100
commit02b092f35830b916c4fc61413600f5ca86d1630a (patch)
treea5cfd5abfc70236ff0d1cfe68ba23b401d47e21c /lib/private/Template/JSConfigHelper.php
parent86d33cf50ffff86a6641ab113bce6801802f19cb (diff)
parent57050146f686d724a9c7ac2c099a6e8b8d591b76 (diff)
downloadnextcloud-server-02b092f35830b916c4fc61413600f5ca86d1630a.tar.gz
nextcloud-server-02b092f35830b916c4fc61413600f5ca86d1630a.zip
Merge pull request #7487 from nextcloud/no-password-confirm-with-sso
disable password confirmation with SSO
Diffstat (limited to 'lib/private/Template/JSConfigHelper.php')
-rw-r--r--lib/private/Template/JSConfigHelper.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index 551fc3b9b0d..bdb747e1c9f 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -101,8 +101,10 @@ class JSConfigHelper {
if ($this->currentUser !== null) {
$uid = $this->currentUser->getUID();
+ $userBackend = $this->currentUser->getBackendClassName();
} else {
$uid = null;
+ $userBackend = '';
}
// Get the config
@@ -147,6 +149,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',
"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