disable the recovery key if the master key is enabled

This commit is contained in:
Bjoern Schiessle 2016-03-02 19:38:21 +01:00
parent 4f25f34178
commit b6050b44c2
2 changed files with 52 additions and 49 deletions

View File

@ -49,5 +49,6 @@ $encryptHomeStorage = $util->shouldEncryptHomeStorage();
$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);
$tmpl->assign('initStatus', $session->getStatus());
$tmpl->assign('encryptHomeStorage', $encryptHomeStorage);
$tmpl->assign('masterKeyEnabled', $util->isMasterKeyEnabled());
return $tmpl->fetchPage();

View File

@ -16,6 +16,7 @@ style('encryption', 'settings-admin');
<em><?php p( $l->t( "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" ) ); ?></em>
</p>
<br />
<?php if($_['masterKeyEnabled'] === false): ?>
<p id="encryptionSetRecoveryKey">
<?php $_["recoveryEnabled"] === '0' ? p($l->t("Enable recovery key")) : p($l->t("Disable recovery key")); ?>
<span class="msg"></span>
@ -68,4 +69,5 @@ style('encryption', 'settings-admin');
</button>
</p>
<?php endif; ?>
<?php endif; ?>
</form>