Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-11-09 14:29:11 +0300
committerBjoern Schiessle <bjoern@schiessle.org>2018-11-09 16:46:38 +0300
commitfadb3a1e4a864361b3a15b0c0ba60c3d6035ff3b (patch)
tree63b7e07ce7db33174d61d9a50d1b755da0c813f0 /lib/Controller
parentbd63790118ce09656c8c01cc3fe6fe70bb938c0d (diff)
add a combobox instead of buttons to select the login method if more then 4 different IDPs are configured
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/SAMLController.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php
index 150b1514..6cbb1317 100644
--- a/lib/Controller/SAMLController.php
+++ b/lib/Controller/SAMLController.php
@@ -366,18 +366,21 @@ class SAMLController extends Controller {
*/
public function selectUserBackEnd($redirectUrl) {
- $loginUrls = [];
+ $attributes = ['loginUrls' => []];
if ($this->SAMLSettings->allowMultipleUserBackEnds()) {
- $loginUrls['directLogin'] = [
+ $attributes['loginUrls']['directLogin'] = [
'url' => $this->getDirectLoginUrl($redirectUrl),
'display-name' => $this->l->t('Direct log in')
];
}
- $loginUrls['ssoLogin'] = $this->getIdps($redirectUrl);
+ $attributes['loginUrls']['ssoLogin'] = $this->getIdps($redirectUrl);
- return new Http\TemplateResponse($this->appName, 'selectUserBackEnd', $loginUrls, 'guest');
+ $attributes['useCombobox'] = count($attributes['loginUrls']['ssoLogin']) > 4 ? true : false;
+
+
+ return new Http\TemplateResponse($this->appName, 'selectUserBackEnd', $attributes, 'guest');
}
/**