]> source.dussan.org Git - nextcloud-server.git/commitdiff
add missing encryption modules to settings
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Tue, 16 Aug 2016 16:11:59 +0000 (18:11 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Tue, 16 Aug 2016 19:11:17 +0000 (21:11 +0200)
lib/private/Settings/Admin/Encryption.php

index 69c6bd17f031385218aab5322acebae2124e6550..6e93407f1a39120a17fa13b0381e25adbdb380c1 100644 (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, '');