add missing encryption modules to settings

This commit is contained in:
Arthur Schiwon 2016-08-16 18:11:59 +02:00 committed by Lukas Reschke
parent 4d505b72de
commit 8ef08e46e8
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 13 additions and 0 deletions

View File

@ -48,11 +48,24 @@ class Encryption implements ISettings {
* @return TemplateResponse
*/
public function getForm() {
$encryptionModules = $this->manager->getEncryptionModules();
$defaultEncryptionModuleId = $this->manager->getDefaultEncryptionModuleId();
$encryptionModuleList = [];
foreach ($encryptionModules as $module) {
$encryptionModuleList[$module['id']]['displayName'] = $module['displayName'];
$encryptionModuleList[$module['id']]['default'] = false;
if ($module['id'] === $defaultEncryptionModuleId) {
$encryptionModuleList[$module['id']]['default'] = true;
}
}
$parameters = [
// Encryption API
'encryptionEnabled' => $this->manager->isEnabled(),
'encryptionReady' => $this->manager->isReady(),
'externalBackendsEnabled' => count($this->userManager->getBackends()) > 1,
// Modules
'encryptionModules' => $encryptionModuleList,
];
return new TemplateResponse('settings', 'admin/encryption', $parameters, '');