aboutsummaryrefslogtreecommitdiffstats
path: root/settings/admin.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-01-14 20:39:23 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2015-03-26 20:56:51 +0100
commitff9c85ce60aac1098c741b7ea630d9fc545e3d96 (patch)
treeb51ab4917630680beb0499fae4a1d7c0ae100e34 /settings/admin.php
parenta9b4f0d8429dbeb612e80b168b6146890bb7843e (diff)
downloadnextcloud-server-ff9c85ce60aac1098c741b7ea630d9fc545e3d96.tar.gz
nextcloud-server-ff9c85ce60aac1098c741b7ea630d9fc545e3d96.zip
implement basic encryption functionallity in core to enable multiple encryption modules
Diffstat (limited to 'settings/admin.php')
-rw-r--r--settings/admin.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php
index 6ec4cef350d..34e26c60d86 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -57,6 +57,23 @@ $template->assign('shareExcludeGroups', $excludeGroups);
$excludedGroupsList = $appConfig->getValue('core', 'shareapi_exclude_groups_list', '');
$excludedGroupsList = explode(',', $excludedGroupsList); // FIXME: this should be JSON!
$template->assign('shareExcludedGroupsList', implode('|', $excludedGroupsList));
+$template->assign('encryptionEnabled', \OC::$server->getEncryptionManager()->isEnabled());
+$encryptionModules = \OC::$server->getEncryptionManager()->getEncryptionModules();
+try {
+ $defaultEncryptionModule = \OC::$server->getEncryptionManager()->getDefaultEncryptionModule();
+ $defaultEncryptionModuleId = $defaultEncryptionModule->getId();
+} catch (Exception $e) {
+ $defaultEncryptionModule = null;
+}
+$encModulues = array();
+foreach ($encryptionModules as $module) {
+ $encModulues[$module->getId()]['displayName'] = $module->getDisplayName();
+ $encModulues[$module->getId()]['default'] = false;
+ if ($defaultEncryptionModule && $module->getId() === $defaultEncryptionModuleId) {
+ $encModulues[$module->getId()]['default'] = true;
+ }
+}
+$template->assign('encryptionModules', $encModulues);
// If the current web root is non-empty but the web root from the config is,
// and system cron is used, the URL generator fails to build valid URLs.
@@ -118,6 +135,7 @@ $formsAndMore = array_merge($formsAndMore, $formsMap);
// add bottom hardcoded forms from the template
$formsAndMore[] = array('anchor' => 'backgroundjobs', 'section-name' => $l->t('Cron'));
$formsAndMore[] = array('anchor' => 'shareAPI', 'section-name' => $l->t('Sharing'));
+$formsAndMore[] = array('anchor' => 'encryptionAPI', 'section-name' => $l->t('Server Side Encryption'));
$formsAndMore[] = array('anchor' => 'mail_general_settings', 'section-name' => $l->t('Email Server'));
$formsAndMore[] = array('anchor' => 'log-section', 'section-name' => $l->t('Log'));