summaryrefslogtreecommitdiffstats
path: root/apps/encryption/controller/statuscontroller.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-05-27 11:10:06 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-05-27 21:00:02 +0200
commit68db3059eec904e90c41a8452799222e21c9c460 (patch)
treec4ab392d196eb3103016bd2f1469d99ee4372e07 /apps/encryption/controller/statuscontroller.php
parent5549641f1f977ab2b105b8f9d7b8c6829c0e6d02 (diff)
downloadnextcloud-server-68db3059eec904e90c41a8452799222e21c9c460.tar.gz
nextcloud-server-68db3059eec904e90c41a8452799222e21c9c460.zip
detect migration status
Diffstat (limited to 'apps/encryption/controller/statuscontroller.php')
-rw-r--r--apps/encryption/controller/statuscontroller.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/encryption/controller/statuscontroller.php b/apps/encryption/controller/statuscontroller.php
index ef3d70a0b4c..cdc4b2e92e0 100644
--- a/apps/encryption/controller/statuscontroller.php
+++ b/apps/encryption/controller/statuscontroller.php
@@ -60,20 +60,29 @@ class StatusController extends Controller {
public function getStatus() {
$status = 'error';
- $message = '';
+ $message = 'no valid init status';
switch( $this->session->getStatus()) {
+ case Session::RUN_MIGRATION:
+ $status = 'interactionNeeded';
+ $message = (string)$this->l->t(
+ 'You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run \'occ encryption:migrate\' or contact your administrator'
+ );
+ break;
case Session::INIT_EXECUTED:
- $status = 'success';
+ $status = 'interactionNeeded';
$message = (string)$this->l->t(
'Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files.'
);
break;
case Session::NOT_INITIALIZED:
- $status = 'success';
+ $status = 'interactionNeeded';
$message = (string)$this->l->t(
'Encryption App is enabled but your keys are not initialized, please log-out and log-in again'
);
break;
+ case Session::INIT_SUCCESSFUL:
+ $status = 'success';
+ $message = (string)$this->l->t('Encryption App is enabled and ready');
}
return new DataResponse(