diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-09-26 23:06:17 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-09-26 23:06:17 +0300 |
commit | 6cdc174fdd87d7cf8b78cbe3b6d2a3e778f9bbee (patch) | |
tree | 8286180e2fffdd8d856bb9f7248a0687eb26bf3c /lib | |
parent | 638e5f2c4162cb7da467a38c6aaaef084f807297 (diff) |
Add switch to configure whether SAML auth is used for desktop clients
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Settings/Admin.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php index 2143ce8a..816b3f9b 100644 --- a/lib/Settings/Admin.php +++ b/lib/Settings/Admin.php @@ -24,6 +24,7 @@ namespace OCA\User_SAML\Settings; use OCP\AppFramework\Http\TemplateResponse; +use OCP\Defaults; use OCP\IL10N; use OCP\IURLGenerator; use OCP\Settings\ISettings; @@ -31,18 +32,22 @@ use OCP\Settings\ISettings; class Admin implements ISettings { /** @var IL10N */ private $l10n; - /** @var IURLGenerator */ private $urlGenerator; + /** @var Defaults */ + private $defaults; /** * @param IL10N $l10n * @param IURLGenerator $urlGenerator + * @param Defaults $defaults */ public function __construct(IL10N $l10n, - IURLGenerator $urlGenerator) { + IURLGenerator $urlGenerator, + Defaults $defaults) { $this->l10n = $l10n; $this->urlGenerator = $urlGenerator; + $this->defaults = $defaults; } /** @@ -78,6 +83,10 @@ class Admin implements ISettings { 'text' => $this->l10n->t('Only allow authentication if an account is existent on some other backend. (e.g. LDAP)'), 'type' => 'checkbox', ], + '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', + ], ]; $params = [ |