From 96b197206e925ab8962365305b165525d38029f4 Mon Sep 17 00:00:00 2001 From: Sascha Markert Date: Wed, 11 May 2022 15:47:21 +0200 Subject: [PATCH] Fix displaying of global checkboxes in user_saml settings Signed-off-by: Sascha Markert Signed-off-by: Sascha Markert Update lib/Settings/Admin.php space to tabs Co-authored-by: Carl Schwan Signed-off-by: Sascha Markert Signed-off-by: Sascha Markert merge latest commits (#1) * Stricter check for direct=1 login Signed-off-by: Carl Schwan * Revert "Handle mobile login flow with direct=1" This reverts commit 86684d6c5473765b9fc3c7f3146f214cbce0dfd4. Signed-off-by: Carl Schwan * [tx-robot] updated from transifex Signed-off-by: Nextcloud bot Co-authored-by: Carl Schwan Co-authored-by: Nextcloud bot Signed-off-by: Sascha Markert Signed-off-by: Sascha Markert Revert "merge latest commits (#1)" This reverts commit 626686f7afa8b373251e966ad28865483d6b56b1. Signed-off-by: Sascha Markert --- lib/Settings/Admin.php | 8 ++++++++ templates/admin.php | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 47937c9..6502207 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -186,10 +186,17 @@ class Admin implements ISettings { $type = $this->config->getAppValue('user_saml', 'type'); if ($type === 'saml') { + $generalSettings['require_provisioned_account'] = [ + 'text' => $this->l10n->t('Only allow authentication if an account exists on some other backend (e.g. LDAP).', [$this->defaults->getName()]), + 'type' => 'checkbox', + 'global' => true, + 'value' => $this->config->getAppValue('user_saml', 'general-require_provisioned_account', 0) + ]; $generalSettings['use_saml_auth_for_desktop'] = [ 'text' => $this->l10n->t('Use SAML auth for the %s desktop clients (requires user re-authentication)', [$this->defaults->getName()]), 'type' => 'checkbox', 'global' => true, + 'value' => $this->config->getAppValue('user_saml', 'general-use_saml_auth_for_desktop', 0) ]; $generalSettings['idp0_display_name'] = [ 'text' => $this->l10n->t('Optional display name of the identity provider (default: "SSO & SAML log in")'), @@ -201,6 +208,7 @@ class Admin implements ISettings { 'type' => 'checkbox', 'hideForEnv' => true, 'global' => true, + 'value' => $this->config->getAppValue('user_saml', 'general-allow_multiple_user_back_ends') ]; } diff --git a/templates/admin.php b/templates/admin.php index 73a9ef5..9fcae32 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -55,12 +55,12 @@ style('user_saml', 'admin'); $attribute): ?>

- +

- class="required" placeholder=""/> + class="required" placeholder=""/>