diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-12 15:01:46 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-12 15:01:46 +0100 |
commit | eac5d9fb3a52932fafdb200a2cf5d50fe9f1c759 (patch) | |
tree | b5ebb8da406d6d667632beb4b764568c8ff954a3 /settings/admin.php | |
parent | 2493cfede92c472c29cffc098206b8cdb7a2ca30 (diff) | |
parent | 0d0377ebfb123e079822632ae4bc6855a11eb117 (diff) | |
download | nextcloud-server-eac5d9fb3a52932fafdb200a2cf5d50fe9f1c759.tar.gz nextcloud-server-eac5d9fb3a52932fafdb200a2cf5d50fe9f1c759.zip |
Merge pull request #21336 from owncloud/system-root-certs
Allow admins to add system wide root certificates
Diffstat (limited to 'settings/admin.php')
-rw-r--r-- | settings/admin.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php index 25db05d99ac..112b9d38c90 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -38,6 +38,10 @@ OC_Util::checkAdminUser(); $template = new OC_Template('settings', 'admin', 'user'); $l = \OC::$server->getL10N('settings'); +OC_Util::addScript('settings', 'certificates'); +OC_Util::addScript('files', 'jquery.iframe-transport'); +OC_Util::addScript('files', 'jquery.fileupload'); + $showLog = (\OC::$server->getConfig()->getSystemValue('log_type', 'owncloud') === 'owncloud'); $numEntriesToLoad = 3; $entries = OC_Log_Owncloud::getEntries($numEntriesToLoad + 1); @@ -52,6 +56,8 @@ if($doesLogFileExist) { $config = \OC::$server->getConfig(); $appConfig = \OC::$server->getAppConfig(); $request = \OC::$server->getRequest(); +$certificateManager = \OC::$server->getCertificateManager(null); +$urlGenerator = \OC::$server->getURLGenerator(); // Should we display sendmail as an option? $template->assign('sendmail_is_available', (bool) \OC_Helper::findBinaryPath('sendmail')); @@ -152,6 +158,16 @@ $template->assign('OutdatedCacheWarning', $outdatedCaches); // add hardcoded forms from the template $forms = OC_App::getForms('admin'); + +if ($config->getSystemValue('enable_certificate_management', false)) { + $certificatesTemplate = new OC_Template('settings', 'certificates'); + $certificatesTemplate->assign('type', 'admin'); + $certificatesTemplate->assign('uploadRoute', 'settings.Certificate.addSystemRootCertificate'); + $certificatesTemplate->assign('certs', $certificateManager->listCertificates()); + $certificatesTemplate->assign('urlGenerator', $urlGenerator); + $forms[] = $certificatesTemplate->fetchPage(); +} + $formsAndMore = array(); if ($request->getServerProtocol() !== 'https' || !OC_Util::isAnnotationsWorking() || $suggestedOverwriteCliUrl || !OC_Util::isSetLocaleWorking() || |