Skip to content

Commit 7a1fec3

Browse files
committed
feat: show field of certificate
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent a62dad8 commit 7a1fec3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/Service/FileService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,9 @@ private function loadSignersFromCertData(): void {
428428
if (!empty($signer['chain'][0]['name'])) {
429429
$this->fileData->signers[$index]['subject'] = $signer['chain'][0]['name'];
430430
}
431+
if (!empty($signer['chain'][0]['field'])) {
432+
$this->fileData->signers[$index]['field'] = $signer['chain'][0]['field'];
433+
}
431434
if (!empty($signer['chain'][0]['validFrom_time_t'])) {
432435
$this->fileData->signers[$index]['valid_from'] = (new DateTime('@' . $signer['chain'][0]['validFrom_time_t'], new \DateTimeZone('UTC')))->format(DateTimeInterface::ATOM);
433436
}

src/views/Validation.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@
194194
{{ signer.certificate_validation.label }}
195195
</template>
196196
</NcListItem>
197+
<NcListItem v-if="signer.opened && signer.field"
198+
class="extra"
199+
compact
200+
:name="t('libresign', 'Field:')">
201+
<template #name>
202+
<strong>{{ t('libresign', 'Field:') }}</strong>
203+
{{ signer.field }}
204+
</template>
205+
</NcListItem>
197206
<NcListItem v-if="signer.opened && signer.remote_address"
198207
class="extra"
199208
compact

0 commit comments

Comments
 (0)