aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-01-22 13:26:10 +0100
committerGitHub <noreply@github.com>2019-01-22 13:26:10 +0100
commitf8275a7c98fe10572d56e5bca5b2b0ad98f36dcf (patch)
tree6460483253707ff1c0ec92624a83b203e94bc3ef
parentb1d4c3f50b00457c1ac10949df4ed5cf9adc9906 (diff)
parent1f47c6976a203c97f0b60a438da7db98bef0096c (diff)
downloadnextcloud-server-f8275a7c98fe10572d56e5bca5b2b0ad98f36dcf.tar.gz
nextcloud-server-f8275a7c98fe10572d56e5bca5b2b0ad98f36dcf.zip
Merge pull request #13722 from nextcloud/design/noid/personal-security-settings
Move 2FA settings above devices & sessions
-rw-r--r--settings/css/settings.scss6
-rw-r--r--settings/templates/settings/personal/security.php56
2 files changed, 35 insertions, 27 deletions
diff --git a/settings/css/settings.scss b/settings/css/settings.scss
index d384ef26577..d3ab389b7ca 100644
--- a/settings/css/settings.scss
+++ b/settings/css/settings.scss
@@ -1239,9 +1239,13 @@ table.grid td.date {
.icon-info {
padding: 11px 20px;
vertical-align: super;
+ opacity: .5;
}
-#shareAPI h2, #encryptionAPI h2, #mail_general_settings h2 {
+#two-factor-auth h2,
+#shareAPI h2,
+#encryptionAPI h2,
+#mail_general_settings h2 {
display: inline-block;
}
diff --git a/settings/templates/settings/personal/security.php b/settings/templates/settings/personal/security.php
index bba4a5f8e7d..ab69f36a00f 100644
--- a/settings/templates/settings/personal/security.php
+++ b/settings/templates/settings/personal/security.php
@@ -63,6 +63,36 @@ if($_['passwordChangeSupported']) {
</div>
<?php } ?>
+<div id="two-factor-auth" class="section">
+ <h2><?php p($l->t('Two-Factor Authentication'));?></h2>
+ <a target="_blank" rel="noreferrer noopener" class="icon-info"
+ title="<?php p($l->t('Open documentation'));?>"
+ href="<?php p(link_to_docs('user-2fa')); ?>"></a>
+ <p class="settings-hint"><?php p($l->t('Use a second factor besides your password to increase security for 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>
+
<div id="security" class="section">
<h2><?php p($l->t('Devices & sessions'));?></h2>
<p class="settings-hint hidden-when-empty"><?php p($l->t('Web, desktop and mobile clients currently logged in to your account.'));?></p>
@@ -99,29 +129,3 @@ if($_['passwordChangeSupported']) {
</div>
</div>
</div>
-
-<div id="two-factor-auth" class="section">
- <h2><?php p($l->t('Two-Factor Authentication'));?></h2>
- <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>