if(initStatus==='0'){// enc not initialized, but should be
OC.Notification.show(t('files_encryption','Encryption App is enabled but your keys are not initialized, please log-out and log-in again'));
return;
}
if(initStatus==='1'){// encryption tried to init but failed
OC.Notification.show(t('files_encryption','Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.'));
return;
}
if(encryptedFiles==='1'){
OC.Notification.show(t('files_encryption','Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.'));
public static function redirectToErrorPage($session) {
$l = \OC_L10N::get('files_encryption');
if ($session->getInitialized() === false) {
$errorMsg = $l->t('Encryption app not initialized! Maybe the encryption app was re-enabled during your session. Please try to log out and log back in to initialize the encryption app.');
} else {
$errorMsg = $l->t('Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files.');