diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-22 17:42:28 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-12 12:50:59 +0100 |
commit | c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f (patch) | |
tree | 08d3aefd146ce159b23073958f2fb7e96ace4143 /settings/admin.php | |
parent | 0c0829fbc73ce10ea1a951989c20973b6b5faa16 (diff) | |
download | nextcloud-server-c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f.tar.gz nextcloud-server-c15cab7ed6bf2d3ce9009ca09c7c5f33b252860f.zip |
Allow admins to add system wide root certificates
Diffstat (limited to 'settings/admin.php')
-rw-r--r-- | settings/admin.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php index d484d6a1e48..7bd3760b6ce 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')); @@ -151,6 +157,14 @@ $template->assign('OutdatedCacheWarning', $outdatedCaches); // add hardcoded forms from the template $forms = OC_App::getForms('admin'); + +$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() || |