summaryrefslogtreecommitdiffstats
path: root/settings/templates
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2018-09-26 16:25:18 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2018-10-02 22:56:33 +0200
commit79a0ee4f4ae315b357f51dd35d3d3c6e60897ee1 (patch)
tree470d5bce819a22357fe820e515d82ca4d8339d64 /settings/templates
parent6b730b4c478bc4f55a89fd7d6a7c2715e2e5b829 (diff)
downloadnextcloud-server-79a0ee4f4ae315b357f51dd35d3d3c6e60897ee1.tar.gz
nextcloud-server-79a0ee4f4ae315b357f51dd35d3d3c6e60897ee1.zip
Consolidate personal two-factor provider settings
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'settings/templates')
-rw-r--r--settings/templates/settings/personal/security.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/settings/templates/settings/personal/security.php b/settings/templates/settings/personal/security.php
index 6dd0e8d3cef..6b2c37b6a88 100644
--- a/settings/templates/settings/personal/security.php
+++ b/settings/templates/settings/personal/security.php
@@ -101,3 +101,38 @@ if($_['passwordChangeSupported']) {
</div>
</div>
</div>
+
+<div id="two-factor-auth" class="section">
+ <h2><?php p($l->t('Two-Factor Authentication'));?></h2>
+ <p class="settings-hint">
+ <?php
+ if ($_['twoFactorProviderData']['enabled']) {
+ p($l->t('Two-factor authentication is enabled on your account.'));
+ } else {
+ p($l->t('Two-factor authentication is disabled on your account.'));
+ }
+ ?>
+ </p>
+ <ul>
+ <?php foreach ($_['twoFactorProviderData']['providers'] as $data) { ?>
+ <li>
+ <?php
+ /** @var \OCP\Authentication\TwoFactorAuth\IProvidesPersonalSettings $provider */
+ $provider = $data['provider'];
+ if ($provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons) {
+ $icon = $provider->getDarkIcon();
+ } else {
+ $icon = image_path('core', 'actions/password.svg');
+ }
+ /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */
+ $settings = $data['settings'];
+ ?>
+ <h3>
+ <img class="two-factor-provider-settings-icon" src="<?php p($icon) ?>" alt="">
+ <?php p($provider->getDisplayName()) ?>
+ </h3>
+ <?php print_unescaped($settings->getBody()->fetchPage()) ?>
+ </li>
+ <?php } ?>
+ </ul>
+</div>