summaryrefslogtreecommitdiffstats
path: root/settings/templates
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-12 15:01:46 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-12 15:01:46 +0100
commiteac5d9fb3a52932fafdb200a2cf5d50fe9f1c759 (patch)
treeb5ebb8da406d6d667632beb4b764568c8ff954a3 /settings/templates
parent2493cfede92c472c29cffc098206b8cdb7a2ca30 (diff)
parent0d0377ebfb123e079822632ae4bc6855a11eb117 (diff)
downloadnextcloud-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/templates')
-rw-r--r--settings/templates/certificates.php44
-rw-r--r--settings/templates/personal.php42
2 files changed, 44 insertions, 42 deletions
diff --git a/settings/templates/certificates.php b/settings/templates/certificates.php
new file mode 100644
index 00000000000..c1ccdcaef95
--- /dev/null
+++ b/settings/templates/certificates.php
@@ -0,0 +1,44 @@
+<div class="section">
+ <h2><?php p($l->t('SSL Root Certificates')); ?></h2>
+ <table id="sslCertificate" class="grid" data-type="<?php p($_['type']); ?>">
+ <thead>
+ <tr>
+ <th><?php p($l->t('Common Name')); ?></th>
+ <th><?php p($l->t('Valid until')); ?></th>
+ <th><?php p($l->t('Issued By')); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($_['certs'] as $rootCert): /**@var \OCP\ICertificate $rootCert */ ?>
+ <tr class="<?php echo ($rootCert->isExpired()) ? 'expired' : 'valid' ?>"
+ data-name="<?php p($rootCert->getName()) ?>">
+ <td class="rootCert"
+ title="<?php p($rootCert->getOrganization()) ?>">
+ <?php p($rootCert->getCommonName()) ?>
+ </td>
+ <td title="<?php p($l->t('Valid until %s', $l->l('date', $rootCert->getExpireDate()))) ?>">
+ <?php echo $l->l('date', $rootCert->getExpireDate()) ?>
+ </td>
+ <td title="<?php p($rootCert->getIssuerOrganization()) ?>">
+ <?php p($rootCert->getIssuerName()) ?>
+ </td>
+ <td <?php if ($rootCert != ''): ?>class="remove"
+ <?php else: ?>style="visibility:hidden;"
+ <?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
+ title="<?php p($l->t('Delete')); ?>"
+ class="svg action"
+ src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <form class="uploadButton" method="post"
+ action="<?php p($_['urlGenerator']->linkToRoute($_['uploadRoute'])); ?>"
+ target="certUploadFrame">
+ <label for="rootcert_import" class="inlineblock button"
+ id="rootcert_import_button"><?php p($l->t('Import root certificate')); ?></label>
+ <input type="file" id="rootcert_import" name="rootcert_import"
+ class="hiddenuploadfield">
+ </form>
+</div>
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index ce179ca8788..5bae01742b6 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -204,48 +204,6 @@ if($_['passwordChangeSupported']) {
<?php }
};?>
-<?php if($_['showCertificates']) : ?>
-<div id="ssl-root-certificates" class="section">
- <h2><?php p($l->t('SSL root certificates')); ?></h2>
- <table id="sslCertificate" class="grid">
- <thead>
- <tr>
- <th><?php p($l->t('Common Name')); ?></th>
- <th><?php p($l->t('Valid until')); ?></th>
- <th><?php p($l->t('Issued By')); ?></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($_['certs'] as $rootCert): /**@var \OCP\ICertificate $rootCert*/ ?>
- <tr class="<?php echo ($rootCert->isExpired()) ? 'expired' : 'valid' ?>" data-name="<?php p($rootCert->getName()) ?>">
- <td class="rootCert" title="<?php p($rootCert->getOrganization())?>">
- <?php p($rootCert->getCommonName()) ?>
- </td>
- <td title="<?php p($l->t('Valid until %s', $l->l('date', $rootCert->getExpireDate()))) ?>">
- <?php echo $l->l('date', $rootCert->getExpireDate()) ?>
- </td>
- <td title="<?php p($rootCert->getIssuerOrganization()) ?>">
- <?php p($rootCert->getIssuerName()) ?>
- </td>
- <td <?php if ($rootCert != ''): ?>class="remove"
- <?php else: ?>style="visibility:hidden;"
- <?php endif; ?>><img alt="<?php p($l->t('Delete')); ?>"
- title="<?php p($l->t('Delete')); ?>"
- class="svg action"
- src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>"/>
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
- <form class="uploadButton" method="post" action="<?php p($_['urlGenerator']->linkToRoute('settings.Certificate.addPersonalRootCertificate')); ?>" target="certUploadFrame">
- <label for="rootcert_import" class="inlineblock button" id="rootcert_import_button"><?php p($l->t('Import root certificate')); ?></label>
- <input type="file" id="rootcert_import" name="rootcert_import" class="hiddenuploadfield">
- </form>
-</div>
-<?php endif; ?>
-
<div class="section">
<h2><?php p($l->t('Version'));?></h2>
<p><a href="<?php print_unescaped($theme->getBaseUrl()); ?>" target="_blank"><?php p($theme->getTitle()); ?></a> <?php p(OC_Util::getHumanVersion()) ?></p>