aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/templates
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-07-28 11:31:06 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-07-28 11:31:06 +0200
commitde4233bc1c6b5cd2605e87c4478b6540f09c2170 (patch)
tree9237630a3c07111004e3b07edb053b2e0c2aa727 /apps/files_encryption/templates
parent40f2a34be113db75cd26166de35e9ba3076e4cf3 (diff)
downloadnextcloud-server-de4233bc1c6b5cd2605e87c4478b6540f09c2170.tar.gz
nextcloud-server-de4233bc1c6b5cd2605e87c4478b6540f09c2170.zip
show a warning in the personal settings and admin settins if the encyption keys are not initialized
Diffstat (limited to 'apps/files_encryption/templates')
-rw-r--r--apps/files_encryption/templates/settings-admin.php4
-rw-r--r--apps/files_encryption/templates/settings-personal.php9
2 files changed, 10 insertions, 3 deletions
diff --git a/apps/files_encryption/templates/settings-admin.php b/apps/files_encryption/templates/settings-admin.php
index d4e6abf004a..a97261dc1c9 100644
--- a/apps/files_encryption/templates/settings-admin.php
+++ b/apps/files_encryption/templates/settings-admin.php
@@ -1,6 +1,9 @@
<form id="encryption" class="section">
<h2><?php p($l->t('Encryption')); ?></h2>
+ <?php if($_["initStatus"] === \OCA\Encryption\Session::NOT_INITIALIZED): ?>
+ <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
+ <?php else: ?>
<p>
<?php p($l->t("Enable recovery key (allow to recover users files in case of password loss):")); ?>
<br/>
@@ -57,4 +60,5 @@
</button>
<span class="msg"></span>
</p>
+ <?php endif; ?>
</form>
diff --git a/apps/files_encryption/templates/settings-personal.php b/apps/files_encryption/templates/settings-personal.php
index e9988df3275..3d44b9fa9a5 100644
--- a/apps/files_encryption/templates/settings-personal.php
+++ b/apps/files_encryption/templates/settings-personal.php
@@ -1,7 +1,11 @@
<form id="encryption" class="section">
<h2><?php p( $l->t( 'Encryption' ) ); ?></h2>
- <?php if ( $_["initialized"] === '1' ): ?>
+ <?php if ( $_["initialized"] === \OCA\Encryption\Session::NOT_INITIALIZED ): ?>
+
+ <?php p($l->t("Encryption App is enabled but your keys are not initialized, please log-out and log-in again")); ?>
+
+ <?php elseif ( $_["initialized"] === \OCA\Encryption\Session::INIT_EXECUTED ): ?>
<p>
<a name="changePKPasswd" />
<label for="changePrivateKeyPasswd">
@@ -33,9 +37,8 @@
</button>
<span class="msg"></span>
</p>
- <?php endif; ?>
- <?php if ( $_["recoveryEnabled"] && $_["privateKeySet"] ): ?>
+ <?php elseif ( $_["recoveryEnabled"] && $_["privateKeySet"] && $_["initialized"] === \OCA\Encryption\Session::INIT_SUCCESSFUL ): ?>
<br />
<p>
<label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>